function TestConfigEntityWithPluginCollections::getPluginCollections

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections::getPluginCollections()
  2. 10 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections::getPluginCollections()
  3. 11.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\TestConfigEntityWithPluginCollections::getPluginCollections()

File

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.