class DerivedAccessControlPlugins in Workbench Access 8
Defines a class for deriving plugins for test-sake.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\workbench_access_test\Plugin\Derivative\DerivedAccessControlPlugins
Expanded class hierarchy of DerivedAccessControlPlugins
File
- tests/
modules/ workbench_access_test/ src/ Plugin/ Derivative/ DerivedAccessControlPlugins.php, line 10
Namespace
Drupal\workbench_access_test\Plugin\DerivativeView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DerivedAccessControlPlugins:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |