You are here

public function TestConfigEntityWithPluginCollections::getPluginCollections in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections::getPluginCollections()
  2. 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections::getPluginCollections()

Gets the plugin collections used by this object.

Return value

\Drupal\Component\Plugin\LazyPluginCollection[] An array of plugin collections, keyed by the property name they use to store their configuration.

Overrides ObjectWithPluginCollectionInterface::getPluginCollections

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php, line 658
Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest.

Class

TestConfigEntityWithPluginCollections

Namespace

Drupal\Tests\Core\Config\Entity

Code

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,
  ];
}