class PlaceBlockDeriver
Defines a deriver for the `placeBlock` config action.
This creates two actions: `placeBlockInDefaultTheme`, and `placeBlockInAdminTheme`. They behave identically except for which theme they target.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Component\Plugin\Derivative\DeriverInterface
- class \Drupal\block\Plugin\ConfigAction\PlaceBlockDeriver extends \Drupal\Component\Plugin\Derivative\DeriverBase
Expanded class hierarchy of PlaceBlockDeriver
File
-
core/
modules/ block/ src/ Plugin/ ConfigAction/ PlaceBlockDeriver.php, line 16
Namespace
Drupal\block\Plugin\ConfigActionView source
final class PlaceBlockDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['placeBlockInAdminTheme'] = [
'which_theme' => 'admin',
] + $base_plugin_definition;
$this->derivatives['placeBlockInDefaultTheme'] = [
'which_theme' => 'default',
] + $base_plugin_definition;
return parent::getDerivativeDefinitions($base_plugin_definition);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DeriverBase::$derivatives | protected | property | List of derivative definitions. | 1 | |
DeriverBase::getDerivativeDefinition | public | function | Gets the definition of a derivative plugin. | Overrides DeriverInterface::getDerivativeDefinition | |
PlaceBlockDeriver::getDerivativeDefinitions | public | function | Gets the definition of all derivatives of a base plugin. | Overrides DeriverBase::getDerivativeDefinitions |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.