class ShortcutsBlock
Same name in other branches
- 9 core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php \Drupal\shortcut\Plugin\Block\ShortcutsBlock
- 10 core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php \Drupal\shortcut\Plugin\Block\ShortcutsBlock
- 11.x core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php \Drupal\shortcut\Plugin\Block\ShortcutsBlock
Provides a 'Shortcut' block.
Plugin annotation
@Block(
id = "shortcuts",
admin_label = @Translation("Shortcuts"),
category = @Translation("Menus")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Plugin\ContextAwarePluginBase implements \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Render\PreviewFallbackInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\shortcut\Plugin\Block\ShortcutsBlock extends \Drupal\Core\Block\BlockBase
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Plugin\ContextAwarePluginBase implements \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Render\PreviewFallbackInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
Expanded class hierarchy of ShortcutsBlock
File
-
core/
modules/ shortcut/ src/ Plugin/ Block/ ShortcutsBlock.php, line 18
Namespace
Drupal\shortcut\Plugin\BlockView source
class ShortcutsBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
return [
shortcut_renderable_links(shortcut_current_displayed_set()),
];
}
/**
* {@inheritdoc}
*/
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'access shortcuts');
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ShortcutsBlock::blockAccess | protected | function | |
ShortcutsBlock::build | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.