You are here

class DerivedAccessControlHierarchy in Workbench Access 8

Defines a hierarchy based on an entity hierarchy field.

Plugin annotation


@AccessControlHierarchy(
  id = "workbench_access_test_derived",
  module = "workbench_access_test",
  deriver = "Drupal\workbench_access_test\Plugin\Derivative\DerivedAccessControlPlugins",
  label = @Translation("Derived plugins"),
  description = @Translation("Uses derivatives for plugins.")
)

Hierarchy

Expanded class hierarchy of DerivedAccessControlHierarchy

File

tests/modules/workbench_access_test/src/Plugin/AccessControlHierarchy/DerivedAccessControlHierarchy.php, line 19

Namespace

Drupal\workbench_access_test\Plugin\AccessControlHierarchy
View source
class DerivedAccessControlHierarchy extends AccessControlHierarchyBase {

  /**
   * {@inheritdoc}
   */
  public function applies($entity_type_id, $bundle) {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityValues(EntityInterface $entity) {
    return [];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccessControlHierarchyBase::$config protected property Config for module.
AccessControlHierarchyBase::$configFactory protected property A configuration factory object to store configuration.
AccessControlHierarchyBase::$entityTypeManager protected property Entity type manager.
AccessControlHierarchyBase::$tree protected property The access tree array.
AccessControlHierarchyBase::$userSectionStorage protected property User section storage.
AccessControlHierarchyBase::addWhere public function Adds a where clause to a view when using a section filter. Overrides AccessControlHierarchyInterface::addWhere
AccessControlHierarchyBase::alterForm public function Alters the selection options provided for an access control field. Overrides AccessControlHierarchyInterface::alterForm 2
AccessControlHierarchyBase::buildConfigurationForm public function Form constructor. Overrides PluginFormInterface::buildConfigurationForm 2
AccessControlHierarchyBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies 2
AccessControlHierarchyBase::checkEntityAccess public function Responds to request for node access. Overrides AccessControlHierarchyInterface::checkEntityAccess
AccessControlHierarchyBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 3
AccessControlHierarchyBase::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 2
AccessControlHierarchyBase::disallowedOptions public function Gets any options that are set but cannot be changed by the editor. Overrides AccessControlHierarchyInterface::disallowedOptions 1
AccessControlHierarchyBase::entityType public function Gets the entity type id controlled by the scheme.
AccessControlHierarchyBase::getApplicableFields public function @inheritdoc Overrides AccessControlHierarchyInterface::getApplicableFields 1
AccessControlHierarchyBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
AccessControlHierarchyBase::getTree public function Gets the entire hierarchy tree. Overrides AccessControlHierarchyInterface::getTree 3
AccessControlHierarchyBase::getViewsJoin public function Returns information on how to join this section data to a base view table. Overrides AccessControlHierarchyInterface::getViewsJoin 2
AccessControlHierarchyBase::id public function Returns the id for a hierarchy. Overrides AccessControlHierarchyInterface::id
AccessControlHierarchyBase::label public function Returns the label for a hierarchy. Overrides AccessControlHierarchyInterface::label
AccessControlHierarchyBase::load public function Loads a hierarchy definition for a single item in the tree. Overrides AccessControlHierarchyInterface::load
AccessControlHierarchyBase::massageFormValues public function Massage form values as appropriate during entity submit. Overrides AccessControlHierarchyInterface::massageFormValues 1
AccessControlHierarchyBase::onDependencyRemoval public function Informs the plugin that a dependency of the scheme will be deleted. Overrides AccessControlHierarchyInterface::onDependencyRemoval 2
AccessControlHierarchyBase::resetTree public function Resets the internal cache of the tree. Overrides AccessControlHierarchyInterface::resetTree
AccessControlHierarchyBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
AccessControlHierarchyBase::submitConfigurationForm public function Form submission handler. Overrides PluginFormInterface::submitConfigurationForm 2
AccessControlHierarchyBase::submitEntity public static function Responds to the submission of an entity form. Overrides AccessControlHierarchyInterface::submitEntity
AccessControlHierarchyBase::validateConfigurationForm public function Form validation handler. Overrides PluginFormInterface::validateConfigurationForm 1
AccessControlHierarchyBase::viewsData public function Adds views data for the plugin. Overrides AccessControlHierarchyInterface::viewsData 2
AccessControlHierarchyBase::__construct public function Constructs a new AccessControlHierarchyBase object. Overrides PluginBase::__construct 1
DerivedAccessControlHierarchy::applies public function Check if this access scheme applies to the given entity. Overrides AccessControlHierarchyInterface::applies
DerivedAccessControlHierarchy::getEntityValues public function Retrieves the access control values from an entity. Overrides AccessControlHierarchyInterface::getEntityValues
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 3
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.
PluginWithFormsTrait::getFormClass public function
PluginWithFormsTrait::hasFormClass public function
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.