function BlockPluginHasSettingsTrayFormAccessCheck::accessBlockPlugin
Same name in other branches
- 8.9.x core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::accessBlockPlugin()
- 10 core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::accessBlockPlugin()
- 11.x core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::accessBlockPlugin()
Checks access for accessing a block plugin's 'settings_tray' form.
Parameters
\Drupal\Core\Block\BlockPluginInterface $block_plugin: The block plugin whose 'settings_tray' form is being accessed.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
See also
settings_tray_preprocess_block()
1 call to BlockPluginHasSettingsTrayFormAccessCheck::accessBlockPlugin()
- BlockPluginHasSettingsTrayFormAccessCheck::access in core/
modules/ settings_tray/ src/ Access/ BlockPluginHasSettingsTrayFormAccessCheck.php - Checks access for accessing a block's 'settings_tray' form.
File
-
core/
modules/ settings_tray/ src/ Access/ BlockPluginHasSettingsTrayFormAccessCheck.php, line 44
Class
- BlockPluginHasSettingsTrayFormAccessCheck
- Determines whether the requested block has a 'settings_tray' form.
Namespace
Drupal\settings_tray\AccessCode
public function accessBlockPlugin(BlockPluginInterface $block_plugin) {
return AccessResult::allowedIf($block_plugin instanceof PluginWithFormsInterface && $block_plugin->hasFormClass('settings_tray'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.