protected function HomeboxLayoutController::buildLocalActions in Homebox 8
Builds the local actions for this listing.
Return value
array An array of local actions for this listing.
1 call to HomeboxLayoutController::buildLocalActions()
- HomeboxLayoutController::listBlocks in src/
Controller/ HomeboxLayoutController.php - Shows a list of blocks that can be added to a theme's layout.
File
- src/
Controller/ HomeboxLayoutController.php, line 260
Class
- HomeboxLayoutController
- Class HomeboxLayoutController.
Namespace
Drupal\homebox\ControllerCode
protected function buildLocalActions() {
$build = $this->localActionManager
->getActionsForRoute($this->routeMatch
->getRouteName());
// Without this workaround, the action links will be rendered as <li> with
// no wrapping <ul> element.
if (!empty($build)) {
$build['#prefix'] = '<ul class="action-links">';
$build['#suffix'] = '</ul>';
}
return $build;
}