You are here

class DerivedAccessControlPlugins in Workbench Access 8

Defines a class for deriving plugins for test-sake.

Hierarchy

Expanded class hierarchy of DerivedAccessControlPlugins

File

tests/modules/workbench_access_test/src/Plugin/Derivative/DerivedAccessControlPlugins.php, line 10

Namespace

Drupal\workbench_access_test\Plugin\Derivative
View source
class DerivedAccessControlPlugins extends DeriverBase {

  /**
   * {@inheritdoc}
   */
  public function getDerivativeDefinitions($base_plugin_definition) {
    $this->derivatives = [];
    foreach ([
      'foo',
      'bar',
    ] as $plugin_id) {
      $this->derivatives[$plugin_id] = [
        'label' => sprintf('Plugin for %s', $plugin_id),
      ] + $base_plugin_definition;
    }
    return $this->derivatives;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DerivedAccessControlPlugins::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides DeriverBase::getDerivativeDefinitions
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition