abstract class DeriverBase in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Component/Plugin/Derivative/DeriverBase.php \Drupal\Component\Plugin\Derivative\DeriverBase
Provides a basic deriver.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
Expanded class hierarchy of DeriverBase
24 files declare their use of DeriverBase
- BlockContent.php in core/
modules/ block_content/ src/ Plugin/ Derivative/ BlockContent.php - Contains \Drupal\block_content\Plugin\Derivative\BlockContent.
- ConfigTranslationContextualLinks.php in core/
modules/ config_translation/ src/ Plugin/ Derivative/ ConfigTranslationContextualLinks.php - Contains \Drupal\config_translation\Plugin\Derivative\ConfigTranslationContextualLinks.
- ConfigTranslationLocalTasks.php in core/
modules/ config_translation/ src/ Plugin/ Derivative/ ConfigTranslationLocalTasks.php - Contains \Drupal\config_translation\Plugin\Derivative\ConfigTranslationLocalTasks.
- ContentTranslationContextualLinks.php in core/
modules/ content_translation/ src/ Plugin/ Derivative/ ContentTranslationContextualLinks.php - Contains \Drupal\content_translation\Plugin\Derivative\ContentTranslationContextualLinks.
- ContentTranslationLocalTasks.php in core/
modules/ content_translation/ src/ Plugin/ Derivative/ ContentTranslationLocalTasks.php - Contains \Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks.
File
- core/
lib/ Drupal/ Component/ Plugin/ Derivative/ DeriverBase.php, line 13 - Contains \Drupal\Component\Plugin\Derivative\DeriverBase.
Namespace
Drupal\Component\Plugin\DerivativeView source
abstract class DeriverBase implements DeriverInterface {
/**
* List of derivative definitions.
*
* @var array
*/
protected $derivatives = array();
/**
* {@inheritdoc}
*/
public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) {
return $this->derivatives[$derivative_id];
}
$this
->getDerivativeDefinitions($base_plugin_definition);
return $this->derivatives[$derivative_id];
}
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
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:: |
|
DeriverBase:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverInterface:: |
24 |