class TestConfigEntityWithPluginCollections in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections
- 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections
Hierarchy
- class \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections extends \Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginCollections
Expanded class hierarchy of TestConfigEntityWithPluginCollections
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php, line 645 - Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest.
Namespace
Drupal\Tests\Core\Config\EntityView source
class TestConfigEntityWithPluginCollections extends ConfigEntityBaseWithPluginCollections {
protected $pluginCollection;
protected $pluginManager;
public function setPluginManager(PluginManagerInterface $plugin_manager) {
$this->pluginManager = $plugin_manager;
}
/**
* {@inheritdoc}
*/
public function getPluginCollections() {
if (!$this->pluginCollection) {
$this->pluginCollection = new DefaultLazyPluginCollection($this->pluginManager, [
'the_instance_id' => [
'id' => 'the_instance_id',
],
]);
}
return [
'the_plugin_collection_config' => $this->pluginCollection,
];
}
}