function public function SettingBase::access

8.x-3.x SettingBase.php public SettingBase::access()

Indicates whether a setting is accessible.

Return value

\Drupal\Core\Access\AccessResultInterface The value to supply to the setting's #access property.

Overrides SettingInterface::access

Class

SettingBase
Base class for a setting.

Namespace

Drupal\bootstrap\Plugin\Setting

Source src/Plugin/Setting/SettingBase.php (line 25)

public function access() {
  // Hide the setting if is been deprecated.
  if ($this instanceof DeprecatedSettingInterface) {
    return AccessResultForbidden::forbidden();
  }
  return AccessResultAllowed::allowed();
}