You are here

public function BlockHasOverridesAccessCheck::access in Drupal 8

Same name and namespace in other branches
  1. 9 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));
}