Skip to content
Snippets Groups Projects
Verified Commit a031f244 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3487586 by geek-merlin: BlockLibraryController typehints...

Issue #3487586 by geek-merlin: BlockLibraryController typehints LazyContextRepository, not the interface

(cherry picked from commit 7a0fee2e)
parent 1fa732c9
No related branches found
No related tags found
No related merge requests found
Pipeline #373041 passed with warnings
Pipeline: drupal

#373073

    Pipeline: drupal

    #373067

      Pipeline: drupal

      #373057

        +1
        ......@@ -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;
        /**
        ......@@ -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.
        *
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment