You are here

class AccessDenied in Rabbit Hole 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/RabbitHoleBehaviorPlugin/AccessDenied.php \Drupal\rabbit_hole\Plugin\RabbitHoleBehaviorPlugin\AccessDenied

Denies access to a page.

Plugin annotation


@RabbitHoleBehaviorPlugin(
  id = "access_denied",
  label = @Translation("Access denied")
)

Hierarchy

Expanded class hierarchy of AccessDenied

1 file declares its use of AccessDenied
RabbitHoleBehaviorPluginTest.php in tests/src/Functional/RabbitHoleBehaviorPluginTest.php

File

src/Plugin/RabbitHoleBehaviorPlugin/AccessDenied.php, line 18

Namespace

Drupal\rabbit_hole\Plugin\RabbitHoleBehaviorPlugin
View source
class AccessDenied extends RabbitHoleBehaviorPluginBase {

  /**
   * {@inheritdoc}
   */
  public function performAction(EntityInterface $entity, Response $current_response = NULL) {
    throw new AccessDeniedHttpException();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccessDenied::performAction public function Perform the rabbit hole action. Overrides RabbitHoleBehaviorPluginBase::performAction
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 98
RabbitHoleBehaviorPluginBase::alterExtraFields public function Add to or adjust the fields added by rabbit hole. Overrides RabbitHoleBehaviorPluginInterface::alterExtraFields 1
RabbitHoleBehaviorPluginBase::getBundleSettings protected function Returns configuration object with "Rabbit Hole" bundle settings.
RabbitHoleBehaviorPluginBase::getFallbackAction protected function Returns the fallback action in case if action cannot be performed. 1
RabbitHoleBehaviorPluginBase::settingsForm public function Return a settings form for the rabbit hole action. Overrides RabbitHoleBehaviorPluginInterface::settingsForm 1
RabbitHoleBehaviorPluginBase::settingsFormHandleSubmit public function Handle submission of the settings form for this plugin. Overrides RabbitHoleBehaviorPluginInterface::settingsFormHandleSubmit
RabbitHoleBehaviorPluginBase::usesResponse public function Get whether this plugin uses a response to perform its action. Overrides RabbitHoleBehaviorPluginInterface::usesResponse
RabbitHoleBehaviorPluginInterface::USES_RESPONSE_ALWAYS constant
RabbitHoleBehaviorPluginInterface::USES_RESPONSE_NEVER constant
RabbitHoleBehaviorPluginInterface::USES_RESPONSE_SOMETIMES constant