function BlockPluginHasSettingsTrayFormAccessCheck::access

Same name in other branches
  1. 9 core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::access()
  2. 8.9.x core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php \Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck::access()
  3. 11.x 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\Access

Code

public function access(BlockInterface $block) {
    
    /** @var \Drupal\Core\Block\BlockPluginInterface $block_plugin */
    $block_plugin = $block->getPlugin();
    return $this->accessBlockPlugin($block_plugin);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.