diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index db2552b..672a0d1 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -251,7 +251,7 @@ public static function queue($name, $reliable = FALSE) { /** * Returns a key/value storage collection. * - * @param $collection + * @param string $collection * Name of the key/value collection to return. * * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface @@ -305,10 +305,10 @@ public static function entityQuery($entity_type, $conjunction = 'AND') { /** * Returns the entity query aggregate object for this entity type. * - * @param $entity_type + * @param string $entity_type * The entity type, e.g. node, for which the query object should be * returned. - * @param $conjunction + * @param string $conjunction * AND if all conditions in the query need to apply, OR if any of them is * enough. Optional, defaults to AND. * @@ -331,7 +331,7 @@ public static function flood() { /** * Returns the module handler. * - * @return \Drupal\Core\Extension\ModuleHandler + * @return \Drupal\Core\Extension\ModuleHandlerInterface */ public static function moduleHandler() { return static::$container->get('module_handler'); @@ -364,7 +364,7 @@ public static function token() { /** * Returns the url generator service. * - * @return \Drupal\Core\Routing\UrlGenerator + * @return \Drupal\Core\Routing\PathBasedGeneratorInterface * The url generator service. */ public static function urlGenerator() { diff --git a/core/lib/Drupal/Core/Controller/ControllerBase.php b/core/lib/Drupal/Core/Controller/ControllerBase.php new file mode 100644 index 0000000..33b573d --- /dev/null +++ b/core/lib/Drupal/Core/Controller/ControllerBase.php @@ -0,0 +1,172 @@ +container->get('plugin.manager.entity'); + } + + /** + * Returns the requested cache bin. + * + * @param string $bin + * (optional) The cache bin for which the cache object should be returned, + * defaults to 'cache'. + * + * @return \Drupal\Core\Cache\CacheBackendInterface + * The cache object associated with the specified bin. + */ + protected function cache($bin = 'cache') { + return $this->container->get('cache.' . $bin); + } + + /** + * Retrieves a configuration object. + * + * This is the main entry point to the configuration API. Calling + * @code $this->config('book.admin') @endcode will return a configuration + * object in which the book module can store its administrative settings. + * + * @param string $name + * The name of the configuration object to retrieve. The name corresponds to + * a configuration file. For @code config('book.admin') @endcode, the config + * object returned will contain the contents of book.admin configuration file. + * + * @return \Drupal\Core\Config\Config + * A configuration object. + */ + protected function config($name) { + return $this->container->get('config.factory')->get($name); + } + + /** + * Returns a key/value storage collection. + * + * @param string $collection + * Name of the key/value collection to return. + * + * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface + */ + protected function keyValue($collection) { + return $this->container->get('keyvalue')->get($collection); + } + + /** + * Returns the state storage service. + * + * Use this to store machine-generated data, local to a specific environment + * that does not need deploying and does not need human editing; for example, + * the last time cron was run. Data which needs to be edited by humans and + * needs to be the same across development, production, etc. environments + * (for example, the system maintenance message) should use config() instead. + * + * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface + */ + protected function state() { + return $this->container->get('state'); + } + + /** + * Returns the module handler. + * + * @return \Drupal\Core\Extension\ModuleHandlerInterface + */ + protected function moduleHandler() { + return $this->container->get('module_handler'); + } + + /** + * Returns the url generator service. + * + * @return \Drupal\Core\Routing\PathBasedGeneratorInterface + * The url generator service. + */ + protected function urlGenerator() { + return $this->container->get('url_generator'); + } + + /** + * Translates a string to the current language or to a given language using + * the string translation service. + * + * @param string $string + * A string containing the English string to translate. + * @param array $args + * An associative array of replacements to make after translation. Based + * on the first character of the key, the value is escaped and/or themed. + * See \Drupal\Core\Utility\String::format() for details. + * @param array $options + * An associative array of additional options, with the following elements: + * - 'langcode': The language code to translate to a language other than + * what is used to display the page. + * - 'context': The context the source string belongs to. + * + * @return string + * The translated string. + */ + protected function t($string, array $args = array(), array $options = array()) { + return $this->container->get('string_translation')->translate($string, $args, $options); + } + + /** + * Returns the language manager service. + * + * @return \Drupal\Core\Language\LanguageManager + * The language manager. + */ + protected function languageManager() { + return $this->container->get('language_manager'); + } + + /** + * Returns a redirect response object for the specified + * + * @param string $route_name + * The name of the route to which to redirect. + * @param array $parameters + * Parameters for the route. + * @param int $status + * The HTTP redirect status code for the redirect. The default is 302 Found. + * @return \Symfony\Component\HttpFoundation\RedirectResponse + * A redirect response object that may be returned by the controller. + */ + public function redirect($route_name, array $parameters = array(), $status = 302) { + $url = $this->container->get('url_generator')->generate($route_name, $parameters, TRUE); + return new RedirectResponse($url, $status); + } +} diff --git a/core/lib/Drupal/Core/Controller/ControllerInterface.php b/core/lib/Drupal/Core/Controller/ControllerInjectionInterface.php similarity index 55% rename from core/lib/Drupal/Core/Controller/ControllerInterface.php rename to core/lib/Drupal/Core/Controller/ControllerInjectionInterface.php index f87ae12..e55ce02 100644 --- a/core/lib/Drupal/Core/Controller/ControllerInterface.php +++ b/core/lib/Drupal/Core/Controller/ControllerInjectionInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Controller\ControllerInterface. + * Contains \Drupal\Core\Controller\ControllerInjectionInterface. */ namespace Drupal\Core\Controller; @@ -11,8 +11,16 @@ /** * Defines a common interface for route controllers. + * + * This interface gives controller classes a factory method for instantiation + * rather than relying on a services.yml entry. However, it may result in + * a lot of boilerplate code in the class. As an alternative, controllers that + * contain only limited glue code ("thin" controllers) should instead extend + * ControllerBase as that allows direct access to the container. That renders + * the controller very difficult to unit test so should only be used for + * controllers that are trivial in complexity. */ -interface ControllerInterface { +interface ControllerInjectionInterface { /** * Instantiates a new instance of this controller. diff --git a/core/lib/Drupal/Core/Controller/ControllerResolver.php b/core/lib/Drupal/Core/Controller/ControllerResolver.php index 2fd4ee2..9475282 100644 --- a/core/lib/Drupal/Core/Controller/ControllerResolver.php +++ b/core/lib/Drupal/Core/Controller/ControllerResolver.php @@ -81,7 +81,7 @@ protected function createController($controller) { throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } // @todo Remove the second in_array() once that interface has been removed. - if (in_array('Drupal\Core\Controller\ControllerInterface', class_implements($class))) { + if (in_array('Drupal\Core\Controller\ControllerInjectionInterface', class_implements($class))) { $controller = $class::create($this->container); } else { diff --git a/core/lib/Drupal/Core/Controller/HtmlFormController.php b/core/lib/Drupal/Core/Controller/HtmlFormController.php index 8e88b53..159e3b0 100644 --- a/core/lib/Drupal/Core/Controller/HtmlFormController.php +++ b/core/lib/Drupal/Core/Controller/HtmlFormController.php @@ -82,7 +82,7 @@ public function content(Request $request, $_form) { protected function getFormObject(Request $request, $form_arg) { // If this is a class, instantiate it. if (class_exists($form_arg)) { - if (in_array('Drupal\Core\Controller\ControllerInterface', class_implements($form_arg))) { + if (in_array('Drupal\Core\Controller\ControllerInjectionInterface', class_implements($form_arg))) { return $form_arg::create($this->container); } diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityListController.php b/core/lib/Drupal/Core/Entity/Controller/EntityListController.php index 5edbca1..7a07a38 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityListController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityListController.php @@ -7,40 +7,13 @@ namespace Drupal\Core\Entity\Controller; -use Drupal\Core\Controller\ControllerInterface; -use Drupal\Core\Entity\EntityManager; +use Drupal\Core\Controller\ControllerBase; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Defines a generic controller to list entities. */ -class EntityListController implements ControllerInterface { - - /** - * The entity manager - * - * @var \Drupal\Core\Entity\EntityManager - */ - protected $entityManager; - - /** - * Creates an EntityListController object. - * - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * The entity manager. - */ - public function __construct(EntityManager $entity_manager) { - $this->entityManager = $entity_manager; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - return new static( - $container->get('plugin.manager.entity') - ); - } +class EntityListController extends ControllerBase { /** * Provides the listing page for any entity type. @@ -52,7 +25,7 @@ public static function create(ContainerInterface $container) { * A render array as expected by drupal_render(). */ public function listing($entity_type) { - return $this->entityManager->getListController($entity_type)->render(); + return $this->entityManager()->getListController($entity_type)->render(); } } diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php index b9667d2..a28d44c 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Entity\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Entity\EntityInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -15,7 +15,7 @@ /** * Defines a generic controller to render a single entity. */ -class EntityViewController implements ControllerInterface { +class EntityViewController implements ControllerInjectionInterface { /** * The entity manager diff --git a/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php b/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php index d825415..041e82d 100644 --- a/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php +++ b/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php @@ -7,7 +7,7 @@ namespace Drupal\action\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\FormInterface; use Drupal\Component\Utility\Crypt; use Drupal\Core\Action\ActionManager; @@ -16,7 +16,7 @@ /** * Provides a configuration form for configurable actions. */ -class ActionAdminManageForm implements FormInterface, ControllerInterface { +class ActionAdminManageForm implements FormInterface, ControllerInjectionInterface { /** * The action plugin manager. diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php index a8b1d80..52b7c0d 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php @@ -9,7 +9,7 @@ use Drupal\aggregator\FeedInterface; use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -22,7 +22,7 @@ /** * Returns responses for aggregator module routes. */ -class AggregatorController implements ControllerInterface { +class AggregatorController implements ControllerInjectionInterface { /** * Stores the Entity manager. diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php index 0959fb0..1d438a8 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php @@ -7,7 +7,7 @@ namespace Drupal\aggregator\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Entity\Query\QueryFactory; @@ -20,7 +20,7 @@ /** * Imports feeds from OPML. */ -class OpmlFeedAdd implements ControllerInterface, FormInterface { +class OpmlFeedAdd implements ControllerInjectionInterface, FormInterface { /** * The database connection object. diff --git a/core/modules/ban/lib/Drupal/ban/Form/BanAdmin.php b/core/modules/ban/lib/Drupal/ban/Form/BanAdmin.php index 9e31af2..7a455e7 100644 --- a/core/modules/ban/lib/Drupal/ban/Form/BanAdmin.php +++ b/core/modules/ban/lib/Drupal/ban/Form/BanAdmin.php @@ -7,7 +7,7 @@ namespace Drupal\ban\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\FormInterface; use Drupal\ban\BanIpManager; use Symfony\Component\HttpFoundation\Request; @@ -16,7 +16,7 @@ /** * Displays banned IP addresses. */ -class BanAdmin implements FormInterface, ControllerInterface { +class BanAdmin implements FormInterface, ControllerInjectionInterface { /** * @var \Drupal\ban\BanIpManager diff --git a/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php b/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php index ac1aa91..8002a49 100644 --- a/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php +++ b/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php @@ -7,7 +7,7 @@ namespace Drupal\ban\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\ban\BanIpManager; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,7 +17,7 @@ /** * Provides a form to unban IP addresses. */ -class BanDelete extends ConfirmFormBase implements ControllerInterface { +class BanDelete extends ConfirmFormBase implements ControllerInjectionInterface { /** * The banned IP address. diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php index 03edb7f..62221fc 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php @@ -8,13 +8,13 @@ namespace Drupal\custom_block\Controller; use Drupal\Component\Plugin\PluginManagerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\custom_block\CustomBlockTypeInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; -class CustomBlockController implements ControllerInterface { +class CustomBlockController implements ControllerInjectionInterface { /** * The entity manager. diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php b/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php index f7f4e38..0d065eb 100644 --- a/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php +++ b/core/modules/block/lib/Drupal/block/Controller/BlockAddController.php @@ -7,33 +7,13 @@ namespace Drupal\block\Controller; -use Drupal\Core\Controller\ControllerInterface; -use Drupal\Core\Entity\EntityManager; +use Drupal\Core\Controller\ControllerBase; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller for building the block instance add form. */ -class BlockAddController implements ControllerInterface { - - /** - * Constructs a Block object. - * - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * Entity manager service. - */ - public function __construct(EntityManager $entity_manager) { - $this->entityManager = $entity_manager; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - return new static( - $container->get('plugin.manager.entity') - ); - } +class BlockAddController extends ControllerBase { /** * Build the block instance add form. @@ -51,8 +31,9 @@ public function blockAddConfigureForm($plugin_id, $theme) { drupal_set_title(t('Configure block')); // Create a block entity. - $entity = $this->entityManager->getStorageController('block')->create(array('plugin' => $plugin_id, 'theme' => $theme)); + $entity = $this->entityManager()->getStorageController('block')->create(array('plugin' => $plugin_id, 'theme' => $theme)); - return $this->entityManager->getForm($entity); + return $this->entityManager()->getForm($entity); } + } diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockListController.php b/core/modules/block/lib/Drupal/block/Controller/BlockListController.php index 23b145c..832aaed 100644 --- a/core/modules/block/lib/Drupal/block/Controller/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/Controller/BlockListController.php @@ -9,8 +9,6 @@ use Drupal\Core\Entity\Controller\EntityListController; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Entity\EntityManager; /** * Defines a controller to list blocks. @@ -18,37 +16,6 @@ class BlockListController extends EntityListController { /** - * The configuration factory object. - * - * @var \Drupal\Core\Config\ConfigFactory - */ - protected $configFactory; - - - /** - * Creates an BlockListController object. - * - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * The entity manager. - * @param \Drupal\Core\Config\ConfigFactory $config_factory - * Configuration factory object. - */ - public function __construct(EntityManager $entity_manager, ConfigFactory $config_factory) { - $this->entityManager = $entity_manager; - $this->configFactory = $config_factory; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - return new static( - $container->get('plugin.manager.entity'), - $container->get('config.factory') - ); - } - - /** * Shows the block administration page. * * @param string $entity_type @@ -60,8 +27,8 @@ public static function create(ContainerInterface $container) { * A render array as expected by drupal_render(). */ public function listing($entity_type, $theme = NULL) { - $default_theme = $theme ?: $this->configFactory->get('system.theme')->get('default'); - return $this->entityManager->getListController($entity_type)->render($default_theme); + $default_theme = $theme ?: $this->config('system.theme')->get('default'); + return $this->entityManager()->getListController($entity_type)->render($default_theme); } } diff --git a/core/modules/book/lib/Drupal/book/Controller/BookController.php b/core/modules/book/lib/Drupal/book/Controller/BookController.php index 7b10eaf..0631d7f 100644 --- a/core/modules/book/lib/Drupal/book/Controller/BookController.php +++ b/core/modules/book/lib/Drupal/book/Controller/BookController.php @@ -6,7 +6,7 @@ namespace Drupal\book\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\book\BookManager; @@ -14,7 +14,7 @@ /** * Controller routines for book routes. */ -class BookController implements ControllerInterface { +class BookController implements ControllerInjectionInterface { /** * Book Manager Service. diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php index 84ef0c1..73e83e8 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -9,7 +9,7 @@ use Drupal\comment\CommentInterface; use Drupal\comment\Plugin\Core\Entity\Comment; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Routing\PathBasedGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -23,7 +23,7 @@ * * @see \Drupal\comment\Plugin\Core\Entity\Comment. */ -class CommentController implements ControllerInterface { +class CommentController implements ControllerInjectionInterface { /** * The url generator service. diff --git a/core/modules/config/lib/Drupal/config/Controller/ConfigController.php b/core/modules/config/lib/Drupal/config/Controller/ConfigController.php index 13917c0..72c9fa6 100644 --- a/core/modules/config/lib/Drupal/config/Controller/ConfigController.php +++ b/core/modules/config/lib/Drupal/config/Controller/ConfigController.php @@ -7,7 +7,7 @@ namespace Drupal\config\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Component\Archiver\ArchiveTar; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -18,7 +18,7 @@ /** * Returns responses for config module routes. */ -class ConfigController implements ControllerInterface { +class ConfigController implements ControllerInjectionInterface { /** * The target storage. @@ -37,7 +37,7 @@ class ConfigController implements ControllerInterface { /** * The file download controller. * - * @var \Drupal\Core\Controller\ControllerInterface + * @var \Drupal\Core\Controller\ControllerInjectionInterface */ protected $fileDownloadController; @@ -59,10 +59,10 @@ public static function create(ContainerInterface $container) { * The target storage. * @param \Drupal\Core\Config\StorageInterface $source_storage * The source storage - * @param \Drupal\Core\Controller\ControllerInterface $file_download_controller + * @param \Drupal\Core\Controller\ControllerInjectionInterface $file_download_controller * The file download controller. */ - public function __construct(StorageInterface $target_storage, StorageInterface $source_storage, ControllerInterface $file_download_controller) { + public function __construct(StorageInterface $target_storage, StorageInterface $source_storage, ControllerInjectionInterface $file_download_controller) { $this->targetStorage = $target_storage; $this->sourceStorage = $source_storage; $this->fileDownloadController = $file_download_controller; diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php index 8c5cb96..f8c1580 100644 --- a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php +++ b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php @@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Lock\LockBackendInterface; @@ -25,7 +25,7 @@ /** * Construct the storage changes in a configuration synchronization form. */ -class ConfigSync implements ControllerInterface, FormInterface { +class ConfigSync implements ControllerInjectionInterface, FormInterface { /** * The database lock object. diff --git a/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php b/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php index 3119a1b..b808c0e 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php +++ b/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php @@ -9,14 +9,14 @@ use Drupal\Component\Utility\Unicode; use Drupal\Core\Database\Connection; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Returns responses for dblog routes. */ -class DbLogController implements ControllerInterface { +class DbLogController implements ControllerInjectionInterface { /** * The database service. diff --git a/core/modules/edit/lib/Drupal/edit/EditController.php b/core/modules/edit/lib/Drupal/edit/EditController.php index 2979e89..a2c837d 100644 --- a/core/modules/edit/lib/Drupal/edit/EditController.php +++ b/core/modules/edit/lib/Drupal/edit/EditController.php @@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Drupal\Core\Ajax\AjaxResponse; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManager; use Drupal\field\FieldInfo; @@ -29,7 +29,7 @@ /** * Returns responses for Edit module routes. */ -class EditController implements ControllerInterface { +class EditController implements ControllerInjectionInterface { /** * The TempStore factory. diff --git a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php index 81a684f..266ef1e 100644 --- a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php +++ b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php @@ -8,13 +8,13 @@ namespace Drupal\entity\Controller; use Drupal\Component\Plugin\PluginManagerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides methods for entity display mode routes. */ -class EntityDisplayModeController implements ControllerInterface { +class EntityDisplayModeController implements ControllerInjectionInterface { /** * The entity manager. diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php index b6099f1..7577c0a 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php @@ -11,12 +11,12 @@ use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; /** * Defines route controller for entity reference. */ -class EntityReferenceController implements ControllerInterface { +class EntityReferenceController implements ControllerInjectionInterface { /** * The autocomplete helper for entity references. diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php index 841c056..75900d1 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php @@ -8,7 +8,7 @@ namespace Drupal\field_ui; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\entity\EntityDisplayBaseInterface; use Drupal\field\FieldInstanceInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Field UI display overview form. */ -class DisplayOverview extends DisplayOverviewBase implements ControllerInterface { +class DisplayOverview extends DisplayOverviewBase implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php index 305596f..9b478ec 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php @@ -7,7 +7,7 @@ namespace Drupal\field_ui\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormInterface; @@ -19,7 +19,7 @@ /** * Provides a form for the field settings edit page. */ -class FieldEditForm implements FormInterface, ControllerInterface { +class FieldEditForm implements FormInterface, ControllerInjectionInterface { /** * The field instance being edited. diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php index 046e012..3e98bca 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php @@ -7,7 +7,7 @@ namespace Drupal\field_ui\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Entity\EntityNG; @@ -22,7 +22,7 @@ /** * Provides a form for the field instance settings form. */ -class FieldInstanceEditForm implements FormInterface, ControllerInterface { +class FieldInstanceEditForm implements FormInterface, ControllerInjectionInterface { /** * The field instance being edited. diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php index d2ab86a..64c180d 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php @@ -8,7 +8,7 @@ namespace Drupal\field_ui; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\entity\EntityDisplayBaseInterface; use Drupal\field\FieldInstanceInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Field UI form display overview form. */ -class FormDisplayOverview extends DisplayOverviewBase implements ControllerInterface { +class FormDisplayOverview extends DisplayOverviewBase implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php index 39ffb8d..c223957 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php @@ -8,14 +8,14 @@ namespace Drupal\field_ui; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Form\FormInterface; /** * Abstract base class for Field UI overview forms. */ -abstract class OverviewBase implements FormInterface, ControllerInterface { +abstract class OverviewBase implements FormInterface, ControllerInjectionInterface { /** * The name of the entity type. diff --git a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php index 51747fd..aa01c0f 100644 --- a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php +++ b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php @@ -8,7 +8,7 @@ namespace Drupal\forum\Controller; use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\taxonomy\TermStorageControllerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Controller routines for forum routes. */ -class ForumController implements ControllerInterface { +class ForumController implements ControllerInjectionInterface { /** * Entity Manager Service. diff --git a/core/modules/help/lib/Drupal/help/Controller/HelpController.php b/core/modules/help/lib/Drupal/help/Controller/HelpController.php index 8bea58c..d565d56 100644 --- a/core/modules/help/lib/Drupal/help/Controller/HelpController.php +++ b/core/modules/help/lib/Drupal/help/Controller/HelpController.php @@ -6,14 +6,14 @@ namespace Drupal\help\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for help routes. */ -class HelpController implements ControllerInterface { +class HelpController implements ControllerInjectionInterface { /** * Stores the module handler. diff --git a/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php b/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php index 34146c2..c16391f 100644 --- a/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php +++ b/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\Crypt; use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Lock\LockBackendInterface; use Drupal\Core\StringTranslation\Translator\TranslatorInterface; @@ -25,7 +25,7 @@ /** * Defines a controller to serve image styles. */ -class ImageStyleDownloadController extends FileDownloadController implements ControllerInterface { +class ImageStyleDownloadController extends FileDownloadController implements ControllerInjectionInterface { /** * The config factory. diff --git a/core/modules/image/lib/Drupal/image/Form/ImageEffectAddForm.php b/core/modules/image/lib/Drupal/image/Form/ImageEffectAddForm.php index 1d644e6..7728b97 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageEffectAddForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectAddForm.php @@ -7,7 +7,7 @@ namespace Drupal\image\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\image\ImageEffectManager; use Drupal\image\ImageStyleInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Provides an add form for image effects. */ -class ImageEffectAddForm extends ImageEffectFormBase implements ControllerInterface { +class ImageEffectAddForm extends ImageEffectFormBase implements ControllerInjectionInterface { /** * The image effect manager. diff --git a/core/modules/language/tests/language_test/lib/Drupal/language_test/Controller/LanguageTestController.php b/core/modules/language/tests/language_test/lib/Drupal/language_test/Controller/LanguageTestController.php index 5670d8f..08344e8 100644 --- a/core/modules/language/tests/language_test/lib/Drupal/language_test/Controller/LanguageTestController.php +++ b/core/modules/language/tests/language_test/lib/Drupal/language_test/Controller/LanguageTestController.php @@ -7,7 +7,7 @@ namespace Drupal\language_test\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -15,7 +15,7 @@ /** * Controller routines for language_test routes. */ -class LanguageTestController implements ControllerInterface { +class LanguageTestController implements ControllerInjectionInterface { /** * The HTTP kernel service. diff --git a/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php b/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php index b9ad7f9..112ab52 100644 --- a/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php +++ b/core/modules/layout/lib/Drupal/layout/Controller/LayoutController.php @@ -6,14 +6,14 @@ namespace Drupal\layout\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\layout\Plugin\Type\LayoutManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for layout routes. */ -class LayoutController implements ControllerInterface { +class LayoutController implements ControllerInjectionInterface { /** * Stores the Layout manager. diff --git a/core/modules/layout/tests/layout_test/lib/Drupal/layout_test/Controller/LayoutTestController.php b/core/modules/layout/tests/layout_test/lib/Drupal/layout_test/Controller/LayoutTestController.php index a1ca946..1f051c4 100644 --- a/core/modules/layout/tests/layout_test/lib/Drupal/layout_test/Controller/LayoutTestController.php +++ b/core/modules/layout/tests/layout_test/lib/Drupal/layout_test/Controller/LayoutTestController.php @@ -6,14 +6,14 @@ namespace Drupal\layout_test\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for layout_test routes. */ -class LayoutTestController implements ControllerInterface{ +class LayoutTestController implements ControllerInjectionInterface{ /** * Stores the entity storage controller. diff --git a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php index 7d95e3a..2edb92c 100644 --- a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php +++ b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php @@ -6,7 +6,7 @@ namespace Drupal\locale\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Routing\PathBasedGeneratorInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -14,7 +14,7 @@ /** * Return response for manual check translations. */ -class LocaleController implements ControllerInterface { +class LocaleController implements ControllerInjectionInterface { /** * The module handler. diff --git a/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php b/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php index f707dfb..ca38330 100644 --- a/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php +++ b/core/modules/menu/lib/Drupal/menu/Controller/MenuController.php @@ -7,7 +7,7 @@ namespace Drupal\menu\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\menu_link\MenuLinkStorageControllerInterface; use Drupal\system\MenuInterface; @@ -18,7 +18,7 @@ /** * Returns responses for Menu routes. */ -class MenuController implements ControllerInterface { +class MenuController implements ControllerInjectionInterface { /** * The menu link storage. diff --git a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php index 381ae80..6c2df84 100644 --- a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php +++ b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php @@ -8,7 +8,7 @@ namespace Drupal\node\Form; use Drupal\Core\Form\ConfirmFormBase; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Drupal\Component\Utility\String; use Drupal\user\TempStoreFactory; @@ -19,7 +19,7 @@ /** * Provides a node deletion confirmation form. */ -class DeleteMultiple extends ConfirmFormBase implements ControllerInterface { +class DeleteMultiple extends ConfirmFormBase implements ControllerInjectionInterface { /** * The array of nodes to delete. diff --git a/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php index 8c06d49..ed1a21d 100644 --- a/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php +++ b/core/modules/node/lib/Drupal/node/Form/NodeRevisionDeleteForm.php @@ -7,7 +7,7 @@ namespace Drupal\node\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Form\ConfirmFormBase; @@ -18,7 +18,7 @@ /** * Provides a form for reverting a node revision. */ -class NodeRevisionDeleteForm extends ConfirmFormBase implements ControllerInterface { +class NodeRevisionDeleteForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The node revision. diff --git a/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php b/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php index d4c69ec..5fcb9f8 100644 --- a/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php +++ b/core/modules/node/lib/Drupal/node/Form/NodeRevisionRevertForm.php @@ -7,7 +7,7 @@ namespace Drupal\node\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\node\NodeInterface; @@ -17,7 +17,7 @@ /** * Provides a form for reverting a node revision. */ -class NodeRevisionRevertForm extends ConfirmFormBase implements ControllerInterface { +class NodeRevisionRevertForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The node revision. diff --git a/core/modules/path/lib/Drupal/path/Form/DeleteForm.php b/core/modules/path/lib/Drupal/path/Form/DeleteForm.php index 2d4bcff..982fefb 100644 --- a/core/modules/path/lib/Drupal/path/Form/DeleteForm.php +++ b/core/modules/path/lib/Drupal/path/Form/DeleteForm.php @@ -7,7 +7,7 @@ namespace Drupal\path\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Path\Path; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Builds the form to delete a path alias. */ -class DeleteForm extends ConfirmFormBase implements ControllerInterface { +class DeleteForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The path crud service. diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php index a67b53b..0e275f7 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php @@ -7,10 +7,7 @@ namespace Drupal\shortcut\Controller; -use Drupal\Core\Controller\ControllerInterface; -use Drupal\Core\Entity\EntityManager; -use Drupal\Core\Extension\ModuleHandlerInterface; -use Drupal\Core\Routing\PathBasedGeneratorInterface; +use Drupal\Core\Controller\ControllerBase; use Drupal\shortcut\ShortcutSetInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -20,55 +17,7 @@ /** * Builds the page for administering shortcut sets. */ -class ShortcutSetController implements ControllerInterface { - - /** - * The module handler. - * - * @var \Drupal\Core\Extension\ModuleHandlerInterface - */ - protected $moduleHandler; - - /** - * Stores the entity manager. - * - * @var \Drupal\Core\Entity\EntityManager - */ - protected $entityManager; - - /** - * The URL generator. - * - * @var \Drupal\Core\Routing\PathBasedGeneratorInterface - */ - protected $urlGenerator; - - /** - * Constructs a new \Drupal\shortcut\Controller\ShortCutController object. - * - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * The entity manager. - * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler - * The module handler. - * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator - * The URL generator. - */ - public function __construct(EntityManager $entity_manager, ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) { - $this->entityManager = $entity_manager; - $this->moduleHandler = $module_handler; - $this->urlGenerator = $url_generator; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - return new static( - $container->get('plugin.manager.entity'), - $container->get('module_handler'), - $container->get('url_generator') - ); - } +class ShortcutSetController extends ControllerBase { /** * Creates a new link in the provided shortcut set. @@ -93,7 +42,7 @@ public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Reques 'link_title' => $title, 'link_path' => $link, ); - $this->moduleHandler->loadInclude('shortcut', 'admin.inc'); + $this->moduleHandler()->loadInclude('shortcut', 'admin.inc'); shortcut_admin_add_link($link, $shortcut_set); if ($shortcut_set->save() == SAVED_UPDATED) { drupal_set_message(t('Added a shortcut for %title.', array('%title' => $link['link_title']))); @@ -101,7 +50,7 @@ public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Reques else { drupal_set_message(t('Unable to add a shortcut for %title.', array('%title' => $link['link_title']))); } - return new RedirectResponse($this->urlGenerator->generateFromPath('', array('absolute' => TRUE))); + return new RedirectResponse($this->urlGenerator()->generateFromPath('', array('absolute' => TRUE))); } throw new AccessDeniedHttpException(); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php index 3eb42ce..1491eb9 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php @@ -7,7 +7,7 @@ namespace Drupal\simpletest\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Form\FormInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Test results form for $test_id. */ -class SimpletestResultsForm implements FormInterface, ControllerInterface { +class SimpletestResultsForm implements FormInterface, ControllerInjectionInterface { /** * Associative array of themed result images keyed by status. diff --git a/core/modules/system/lib/Drupal/system/Controller/AdminController.php b/core/modules/system/lib/Drupal/system/Controller/AdminController.php index 6bda138..8c29b0b 100644 --- a/core/modules/system/lib/Drupal/system/Controller/AdminController.php +++ b/core/modules/system/lib/Drupal/system/Controller/AdminController.php @@ -7,14 +7,14 @@ namespace Drupal\system\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller for admin section. */ -class AdminController implements ControllerInterface { +class AdminController implements ControllerInjectionInterface { /** * Module handler service. diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php b/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php index af48c1f..f693090 100644 --- a/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php +++ b/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php @@ -9,14 +9,14 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Response; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\system\SystemManager; /** * Returns responses for System Info routes. */ -class SystemInfoController implements ControllerInterface { +class SystemInfoController implements ControllerInjectionInterface { /** * System Manager Service. diff --git a/core/modules/system/lib/Drupal/system/Controller/ThemeController.php b/core/modules/system/lib/Drupal/system/Controller/ThemeController.php index 0c163b8..d744dac 100644 --- a/core/modules/system/lib/Drupal/system/Controller/ThemeController.php +++ b/core/modules/system/lib/Drupal/system/Controller/ThemeController.php @@ -8,7 +8,7 @@ namespace Drupal\system\Controller; use Drupal\Core\Config\Config; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -17,7 +17,7 @@ /** * Controller for theme handling. */ -class ThemeController implements ControllerInterface { +class ThemeController implements ControllerInjectionInterface { /** * The system.theme config object. diff --git a/core/modules/system/lib/Drupal/system/FileDownloadController.php b/core/modules/system/lib/Drupal/system/FileDownloadController.php index 8bff1bb..945e15d 100644 --- a/core/modules/system/lib/Drupal/system/FileDownloadController.php +++ b/core/modules/system/lib/Drupal/system/FileDownloadController.php @@ -7,7 +7,7 @@ namespace Drupal\system; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; @@ -18,7 +18,7 @@ /** * System file controller. */ -class FileDownloadController implements ControllerInterface { +class FileDownloadController implements ControllerInjectionInterface { /** * The module handler. diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php index 3d3dfc7..d301b96 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Datetime\Date; use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Entity\EntityControllerInterface; diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php index d3de481..ca6eece 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Config\ConfigFactory; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Builds a form for enabling a module. */ -class DateFormatLocalizeResetForm extends ConfirmFormBase implements ControllerInterface { +class DateFormatLocalizeResetForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The language to be reset. diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php index 8296ba6..78d4415 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListConfirmForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; @@ -19,7 +19,7 @@ /** * Builds a confirmation form for enabling modules with dependencies. */ -class ModulesListConfirmForm extends ConfirmFormBase implements ControllerInterface { +class ModulesListConfirmForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The module handler service. diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php index c699c09..3a0447e 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\KeyValueStore\KeyValueExpirableFactory; @@ -25,7 +25,7 @@ * requires. See drupal_parse_info_file() for info on module.info.yml * descriptors. */ -class ModulesListForm implements FormInterface, ControllerInterface { +class ModulesListForm implements FormInterface, ControllerInjectionInterface { /** * The module handler service. diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php index 463eb5a..6d45ae6 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php @@ -12,7 +12,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\KeyValueStore\KeyValueExpirableFactory; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -20,7 +20,7 @@ /** * Builds a confirmation form to uninstall selected modules. */ -class ModulesUninstallConfirmForm extends ConfirmFormBase implements ControllerInterface { +class ModulesUninstallConfirmForm extends ConfirmFormBase implements ControllerInjectionInterface { /** * The module handler service. diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php index a6b3dea..a061e9e 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php @@ -10,7 +10,7 @@ use Drupal\Core\Form\FormInterface; use Drupal\Core\StringTranslation\TranslationManager; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\KeyValueStore\KeyValueExpirableFactory; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -19,7 +19,7 @@ /** * Provides a form for uninstalling modules. */ -class ModulesUninstallForm implements FormInterface, ControllerInterface { +class ModulesUninstallForm implements FormInterface, ControllerInjectionInterface { /** * The module handler service. diff --git a/core/modules/system/lib/Drupal/system/MachineNameController.php b/core/modules/system/lib/Drupal/system/MachineNameController.php index 23cbc22..f024c22 100644 --- a/core/modules/system/lib/Drupal/system/MachineNameController.php +++ b/core/modules/system/lib/Drupal/system/MachineNameController.php @@ -9,7 +9,7 @@ use Drupal\Component\Transliteration\TransliterationInterface; use Drupal\Component\Utility\Unicode; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,7 +17,7 @@ /** * Controller routines for machine name transliteration routes. */ -class MachineNameController implements ControllerInterface { +class MachineNameController implements ControllerInjectionInterface { /** * The transliteration helper. diff --git a/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php b/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php index eb82bdc..77cdfcd 100644 --- a/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php +++ b/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php @@ -8,7 +8,7 @@ namespace Drupal\system; use Drupal\Core\Form\FormInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Config\Context\ContextInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -16,7 +16,7 @@ /** * Base class for implementing system configuration forms. */ -abstract class SystemConfigFormBase implements FormInterface, ControllerInterface { +abstract class SystemConfigFormBase implements FormInterface, ControllerInjectionInterface { /** * Stores the configuration factory. diff --git a/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php index 77b8606..fe49081 100644 --- a/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php +++ b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php @@ -7,13 +7,13 @@ namespace Drupal\common_test\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for common_test routes. */ -class CommonTestController implements ControllerInterface { +class CommonTestController implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/design_test/lib/Drupal/design_test/Controller/DesignTestController.php b/core/modules/system/tests/modules/design_test/lib/Drupal/design_test/Controller/DesignTestController.php index 2800994..e5b96a1 100644 --- a/core/modules/system/tests/modules/design_test/lib/Drupal/design_test/Controller/DesignTestController.php +++ b/core/modules/system/tests/modules/design_test/lib/Drupal/design_test/Controller/DesignTestController.php @@ -6,12 +6,12 @@ namespace Drupal\design_test\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; /** * Controller routines for design_test routes. */ -class DesignTestController implements ControllerInterface { +class DesignTestController implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestControllerObject.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestControllerObject.php index b342128..e543fe3 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestControllerObject.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestControllerObject.php @@ -8,14 +8,14 @@ namespace Drupal\form_test; use Drupal\Core\Form\FormInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; /** * Provides a test form object. */ -class FormTestControllerObject implements FormInterface, ControllerInterface { +class FormTestControllerObject implements FormInterface, ControllerInjectionInterface { /** * Implements \Drupal\Core\Form\FormInterface::getFormID(). diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php index c790a84..2a4a384 100644 --- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php +++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php @@ -7,13 +7,13 @@ namespace Drupal\theme_test; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for theme test routes. */ -class ThemeTestController implements ControllerInterface { +class ThemeTestController implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtensionTestController.php b/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtensionTestController.php index 79e3211..7a96ca7 100644 --- a/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtensionTestController.php +++ b/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtensionTestController.php @@ -7,13 +7,13 @@ namespace Drupal\twig_extension_test; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for Twig extension test routes. */ -class TwigExtensionTestController implements ControllerInterface { +class TwigExtensionTestController implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php index 6eb318a..3d8bab5 100644 --- a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php +++ b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php @@ -7,13 +7,13 @@ namespace Drupal\twig_theme_test; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for Twig theme test routes. */ -class TwigThemeTestController implements ControllerInterface { +class TwigThemeTestController implements ControllerInjectionInterface { /** * Creates the controller. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php index 74c3d12..938cc7b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php @@ -7,66 +7,14 @@ namespace Drupal\taxonomy\Controller; -use Drupal\Core\Controller\ControllerInterface; -use Drupal\Core\Entity\EntityManager; -use Drupal\Core\Extension\ModuleHandlerInterface; -use Drupal\taxonomy\TermStorageControllerInterface; +use Drupal\Core\Controller\ControllerBase; use Drupal\taxonomy\VocabularyInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides route responses for taxonomy.module. */ -class TaxonomyController implements ControllerInterface { - - /** - * The module handler. - * - * @var \Drupal\Core\Extension\ModuleHandlerInterface - */ - protected $moduleHandler; - - /** - * The entity manager. - * - * @var \Drupal\Core\Entity\EntityManager - */ - protected $entityManager; - - /** - * The taxonomy term storage. - * - * @var \Drupal\taxonomy\TermStorageControllerInterface - */ - protected $termStorage; - - /** - * Constructs a new TaxonomyController. - * - * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler - * The module handler. - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * The entity manager. - * @param \Drupal\taxonomy\TermStorageControllerInterface $term_storage - * The taxonomy term storage. - */ - public function __construct(ModuleHandlerInterface $module_handler, EntityManager $entity_manager, TermStorageControllerInterface $term_storage) { - $this->moduleHandler = $module_handler; - $this->entityManager = $entity_manager; - $this->termStorage = $term_storage; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - $entity_manager = $container->get('plugin.manager.entity'); - return new static( - $container->get('module_handler'), - $entity_manager, - $entity_manager->getStorageController('taxonomy_term') - ); - } +class TaxonomyController extends ControllerBase { /** * Returns a rendered edit form to create a new term associated to the given vocabulary. @@ -78,11 +26,11 @@ public static function create(ContainerInterface $container) { * The taxonomy term add form. */ public function addForm(VocabularyInterface $taxonomy_vocabulary) { - $term = $this->termStorage->create(array('vid' => $taxonomy_vocabulary->id())); - if ($this->moduleHandler->moduleExists('language')) { + $term = $this->entityManager()->getStorageController('taxonomy_term')->create(array('vid' => $taxonomy_vocabulary->id())); + if ($this->moduleHandler()->moduleExists('language')) { $term->langcode = language_get_default_langcode('taxonomy_term', $taxonomy_vocabulary->id()); } - return $this->entityManager->getForm($term); + return $this->entityManager()->getForm($term); } } diff --git a/core/modules/tour/tests/tour_test/lib/Drupal/tour_test/Controller/TourTestController.php b/core/modules/tour/tests/tour_test/lib/Drupal/tour_test/Controller/TourTestController.php index 73b7cde..5acf345 100644 --- a/core/modules/tour/tests/tour_test/lib/Drupal/tour_test/Controller/TourTestController.php +++ b/core/modules/tour/tests/tour_test/lib/Drupal/tour_test/Controller/TourTestController.php @@ -6,13 +6,13 @@ namespace Drupal\tour_test\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for tour_test routes. */ -class TourTestController implements ControllerInterface { +class TourTestController implements ControllerInjectionInterface { /** * {@inheritdoc} diff --git a/core/modules/update/lib/Drupal/update/Controller/UpdateController.php b/core/modules/update/lib/Drupal/update/Controller/UpdateController.php index ba145c0..8e2d100 100644 --- a/core/modules/update/lib/Drupal/update/Controller/UpdateController.php +++ b/core/modules/update/lib/Drupal/update/Controller/UpdateController.php @@ -7,14 +7,14 @@ namespace Drupal\update\Controller; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller routines for update routes. */ -class UpdateController implements ControllerInterface { +class UpdateController implements ControllerInjectionInterface { /** * Module handler service. diff --git a/core/modules/user/lib/Drupal/user/Controller/UserAutocompleteController.php b/core/modules/user/lib/Drupal/user/Controller/UserAutocompleteController.php index 587c7f4..e19596a 100644 --- a/core/modules/user/lib/Drupal/user/Controller/UserAutocompleteController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserAutocompleteController.php @@ -10,13 +10,13 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\user\UserAutocomplete; /** * Controller routines for taxonomy user routes. */ -class UserAutocompleteController implements ControllerInterface { +class UserAutocompleteController implements ControllerInjectionInterface { /** * The user autocomplete helper class to find matching user names. diff --git a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php index ebe5b96..09f2bce 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php @@ -8,7 +8,7 @@ namespace Drupal\user\Form; use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Flood\FloodInterface; use Drupal\Core\Form\FormInterface; @@ -19,7 +19,7 @@ /** * Provides a user login form. */ -class UserLoginForm implements FormInterface, ControllerInterface { +class UserLoginForm implements FormInterface, ControllerInjectionInterface { /** * The config factory. diff --git a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php index 27f40bf..67acd5e 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php @@ -7,7 +7,7 @@ namespace Drupal\user\Form; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\Language\Language; use Drupal\Core\Language\LanguageManager; @@ -18,7 +18,7 @@ /** * Provides a user password reset form. */ -class UserPasswordForm implements FormInterface, ControllerInterface { +class UserPasswordForm implements FormInterface, ControllerInjectionInterface { /** * The user storage controller. diff --git a/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php b/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php index b3c28cc..2e2dbb4 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\String; use Drupal\Core\Cache\Cache; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormInterface; use Drupal\user\RoleStorageControllerInterface; @@ -18,7 +18,7 @@ /** * Provides the user permissions administration form. */ -class UserPermissionsForm implements FormInterface, ControllerInterface { +class UserPermissionsForm implements FormInterface, ControllerInjectionInterface { /** * The module handler. diff --git a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php index b0eea3c..e43c92c 100644 --- a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php +++ b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\Url; use Drupal\Core\Ajax\ReplaceCommand; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\views\Ajax\ScrollTopCommand; use Drupal\views\Ajax\ViewAjaxResponse; @@ -21,7 +21,7 @@ /** * Defines a controller to load a view via AJAX. */ -class ViewAjaxController implements ControllerInterface { +class ViewAjaxController implements ControllerInjectionInterface { /** * The entity storage controller for views. diff --git a/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php b/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php index 3c0b5d9..0b56885 100644 --- a/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php +++ b/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php @@ -7,7 +7,7 @@ namespace Drupal\views\Routing; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\views\ViewExecutableFactory; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,7 +17,7 @@ /** * Defines a page controller to execute and render a view. */ -class ViewPageController implements ControllerInterface { +class ViewPageController implements ControllerInjectionInterface { /** * The entity storage controller. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php index a78c757..bca5129 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php @@ -11,7 +11,7 @@ use Drupal\views\ViewStorageInterface; use Drupal\views_ui\ViewUI; use Drupal\views\ViewsData; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Controller\ControllerInjectionInterface; use Drupal\Core\Entity\EntityManager; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; @@ -25,7 +25,7 @@ /** * Returns responses for Views UI routes. */ -class ViewsUIController implements ControllerInterface { +class ViewsUIController implements ControllerInjectionInterface { /** * Stores the Entity manager.