Loading core/modules/block/src/Controller/BlockLibraryController.php +3 −16 Original line number Diff line number Diff line Loading @@ -7,10 +7,9 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\Core\EventSubscriber\MainContentViewSubscriber; use Drupal\Core\Menu\LocalActionManagerInterface; use Drupal\Core\Plugin\Context\LazyContextRepository; use Drupal\Core\Plugin\Context\ContextRepositoryInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; /** Loading Loading @@ -51,32 +50,20 @@ class BlockLibraryController extends ControllerBase { * * @param \Drupal\Core\Block\BlockManagerInterface $block_manager * The block manager. * @param \Drupal\Core\Plugin\Context\LazyContextRepository $context_repository * @param \Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository * The context repository. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The current route match. * @param \Drupal\Core\Menu\LocalActionManagerInterface $local_action_manager * The local action manager. */ public function __construct(BlockManagerInterface $block_manager, LazyContextRepository $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager) { public function __construct(BlockManagerInterface $block_manager, ContextRepositoryInterface $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager) { $this->blockManager = $block_manager; $this->routeMatch = $route_match; $this->localActionManager = $local_action_manager; $this->contextRepository = $context_repository; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('plugin.manager.block'), $container->get('context.repository'), $container->get('current_route_match'), $container->get('plugin.manager.menu.local_action') ); } /** * Shows a list of blocks that can be added to a theme's layout. * Loading Loading
core/modules/block/src/Controller/BlockLibraryController.php +3 −16 Original line number Diff line number Diff line Loading @@ -7,10 +7,9 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\Core\EventSubscriber\MainContentViewSubscriber; use Drupal\Core\Menu\LocalActionManagerInterface; use Drupal\Core\Plugin\Context\LazyContextRepository; use Drupal\Core\Plugin\Context\ContextRepositoryInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; /** Loading Loading @@ -51,32 +50,20 @@ class BlockLibraryController extends ControllerBase { * * @param \Drupal\Core\Block\BlockManagerInterface $block_manager * The block manager. * @param \Drupal\Core\Plugin\Context\LazyContextRepository $context_repository * @param \Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository * The context repository. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The current route match. * @param \Drupal\Core\Menu\LocalActionManagerInterface $local_action_manager * The local action manager. */ public function __construct(BlockManagerInterface $block_manager, LazyContextRepository $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager) { public function __construct(BlockManagerInterface $block_manager, ContextRepositoryInterface $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager) { $this->blockManager = $block_manager; $this->routeMatch = $route_match; $this->localActionManager = $local_action_manager; $this->contextRepository = $context_repository; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('plugin.manager.block'), $container->get('context.repository'), $container->get('current_route_match'), $container->get('plugin.manager.menu.local_action') ); } /** * Shows a list of blocks that can be added to a theme's layout. * Loading