class SchemeLocalTask in Taxonomy Access Control Lite 8
Provides local tasks for each search page.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\tac_lite\Plugin\Derivative\SchemeLocalTask
Expanded class hierarchy of SchemeLocalTask
1 string reference to 'SchemeLocalTask'
File
- src/
Plugin/ Derivative/ SchemeLocalTask.php, line 10
Namespace
Drupal\tac_lite\Plugin\DerivativeView source
class SchemeLocalTask extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [];
$config = \Drupal::config('tac_lite.settings');
$schemes = $config
->get('tac_lite_schemes');
for ($i = 1; $i <= $schemes; $i++) {
$scheme = $config
->get('tac_lite_config_scheme_' . $i);
$title = $scheme['name'] ? $scheme['name'] : 'Scheme ' . $i;
$this->derivatives[] = [
'title' => $title,
'route_name' => 'tac_lite.scheme_' . $i,
'base_route' => 'tac_lite.administration',
'weight' => $i,
];
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
SchemeLocalTask:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |