Drupal 8  8.0.2
BlockLibraryController Class Reference
Inheritance diagram for BlockLibraryController:

Public Member Functions

 __construct (BlockManagerInterface $block_manager, LazyContextRepository $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager)
 listBlocks (Request $request, $theme)

Static Public Member Functions

static create (ContainerInterface $container)

Protected Member Functions

 buildLocalActions ()

Protected Attributes


Detailed Description

Provides a list of block plugins to be added to the layout.

Constructor & Destructor Documentation

__construct ( BlockManagerInterface  $block_manager,
LazyContextRepository  $context_repository,
RouteMatchInterface  $route_match,
LocalActionManagerInterface  $local_action_manager 

Constructs a BlockLibraryController object.

\Drupal\Core\Block\BlockManagerInterface$block_managerThe block manager.
\Drupal\Core\Plugin\Context\LazyContextRepository$context_repositoryThe context repository.
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match.
\Drupal\Core\Menu\LocalActionManagerInterface$local_action_managerThe local action manager.

References Drupal\routeMatch().

Here is the call graph for this function:

Member Function Documentation

buildLocalActions ( )

Builds the local actions for this listing.

array An array of local actions for this listing.

References Drupal\routeMatch().

Referenced by BlockLibraryController\listBlocks().

Here is the call graph for this function:

Here is the caller graph for this function:

static create ( ContainerInterface  $container)


listBlocks ( Request  $request,

Shows a list of blocks that can be added to a theme's layout.

\Symfony\Component\HttpFoundation\Request$requestThe current request.
string$themeTheme key of the block list.
array A render array as expected by the renderer.

References BlockLibraryController\buildLocalActions(), Json\encode(), Url\fromRoute(), t(), and MainContentViewSubscriber\WRAPPER_FORMAT.

Here is the call graph for this function:

The documentation for this class was generated from the following file: