function BlockHasOverridesAccessCheck::access

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

Class

BlockHasOverridesAccessCheck
Determines whether the requested block has a 'settings_tray' form.

Namespace

Drupal\settings_tray\Access

Code

public function access(BlockInterface $block) {
    return AccessResult::allowedIf(!_settings_tray_has_block_overrides($block));
}

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