class TestDataTypeDeriver
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/Fixtures/Plugin/DataType/TestDataTypeDeriver.php \Drupal\Tests\Core\Plugin\Fixtures\Plugin\DataType\TestDataTypeDeriver
- 8.9.x core/tests/Drupal/Tests/Core/Plugin/Fixtures/Plugin/DataType/TestDataTypeDeriver.php \Drupal\Tests\Core\Plugin\Fixtures\Plugin\DataType\TestDataTypeDeriver
- 10 core/tests/Drupal/Tests/Core/Plugin/Fixtures/Plugin/DataType/TestDataTypeDeriver.php \Drupal\Tests\Core\Plugin\Fixtures\Plugin\DataType\TestDataTypeDeriver
Provides a deriver that returns a plugin for the bare ID and one variant.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Component\Plugin\Derivative\DeriverInterface
- class \Drupal\Tests\Core\Plugin\Fixtures\Plugin\DataType\TestDataTypeDeriver extends \Drupal\Component\Plugin\Derivative\DeriverBase
Expanded class hierarchy of TestDataTypeDeriver
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ Fixtures/ Plugin/ DataType/ TestDataTypeDeriver.php, line 12
Namespace
Drupal\Tests\Core\Plugin\Fixtures\Plugin\DataTypeView source
class TestDataTypeDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ([
'',
'a_variant',
] as $item) {
$this->derivatives[$item] = $base_plugin_definition;
$this->derivatives[$item]['provider'] = 'core';
}
return $this->derivatives;
}
}
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 | |
TestDataTypeDeriver::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.