public function BlockPluginHasSettingsTrayFormAccessCheck::access in Drupal 10
Same name and namespace in other branches
- 8 core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::access()
- 9 core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::access()
Checks access for accessing a block's 'settings_tray' form.
Parameters
\Drupal\block\BlockInterface $block: The block whose 'settings_tray' form is being accessed.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
File
- core/
modules/ settings_tray/ src/ Access/ BlockPluginHasSettingsTrayFormAccessCheck.php, line 27
Class
- BlockPluginHasSettingsTrayFormAccessCheck
- Determines whether the requested block has a 'settings_tray' form.
Namespace
Drupal\settings_tray\AccessCode
public function access(BlockInterface $block) {
/** @var \Drupal\Core\Block\BlockPluginInterface $block_plugin */
$block_plugin = $block
->getPlugin();
return $this
->accessBlockPlugin($block_plugin);
}