class BlockHasOverridesAccessCheck

Same name in other branches
  1. 9 core/modules/settings_tray/src/Access/BlockHasOverridesAccessCheck.php \Drupal\settings_tray\Access\BlockHasOverridesAccessCheck
  2. 8.9.x core/modules/settings_tray/src/Access/BlockHasOverridesAccessCheck.php \Drupal\settings_tray\Access\BlockHasOverridesAccessCheck
  3. 10 core/modules/settings_tray/src/Access/BlockHasOverridesAccessCheck.php \Drupal\settings_tray\Access\BlockHasOverridesAccessCheck

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

@internal

Hierarchy

Expanded class hierarchy of BlockHasOverridesAccessCheck

1 string reference to 'BlockHasOverridesAccessCheck'
settings_tray.services.yml in core/modules/settings_tray/settings_tray.services.yml
core/modules/settings_tray/settings_tray.services.yml
1 service uses BlockHasOverridesAccessCheck
access_check.settings_tray.block.has_overrides in core/modules/settings_tray/settings_tray.services.yml
Drupal\settings_tray\Access\BlockHasOverridesAccessCheck

File

core/modules/settings_tray/src/Access/BlockHasOverridesAccessCheck.php, line 14

Namespace

Drupal\settings_tray\Access
View source
class BlockHasOverridesAccessCheck implements AccessInterface {
    
    /**
     * Checks access for accessing a block's 'settings_tray' form.
     *
     * @param \Drupal\block\BlockInterface $block
     *   The block whose 'settings_tray' form is being accessed.
     *
     * @return \Drupal\Core\Access\AccessResultInterface
     *   The access result.
     */
    public function access(BlockInterface $block) {
        return AccessResult::allowedIf(!_settings_tray_has_block_overrides($block));
    }

}

Members

Title Sort descending Modifiers Object type Summary
BlockHasOverridesAccessCheck::access public function Checks access for accessing a block's 'settings_tray' form.

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