function LayoutDeriver::getDerivativeDefinitions
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php \Drupal\Tests\Core\Layout\LayoutDeriver::getDerivativeDefinitions()
- 8.9.x core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php \Drupal\Tests\Core\Layout\LayoutDeriver::getDerivativeDefinitions()
- 10 core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php \Drupal\Tests\Core\Layout\LayoutDeriver::getDerivativeDefinitions()
Overrides DeriverBase::getDerivativeDefinitions
File
-
core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php, line 514
Class
- LayoutDeriver
- Provides a dynamic layout deriver for the test.
Namespace
Drupal\Tests\Core\LayoutCode
public function getDerivativeDefinitions($base_plugin_definition) {
if ($base_plugin_definition->get('array_based')) {
$this->derivatives['array_based'] = [];
}
if ($base_plugin_definition->get('invalid_provider')) {
$this->derivatives['invalid_provider'] = new LayoutDefinition([
'id' => 'invalid_provider',
'provider' => 'invalid_provider',
]);
$this->derivatives['invalid_provider']
->setClass(LayoutInterface::class);
}
return $this->derivatives;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.