function LazyPluginCollectionTestBase::returnPluginMap
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php \Drupal\Tests\Core\Plugin\LazyPluginCollectionTestBase::returnPluginMap()
- 10 core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php \Drupal\Tests\Core\Plugin\LazyPluginCollectionTestBase::returnPluginMap()
- 11.x core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php \Drupal\Tests\Core\Plugin\LazyPluginCollectionTestBase::returnPluginMap()
Return callback for createInstance.
Parameters
string $plugin_id: The plugin ID to return the mock plugin for.
Return value
\Drupal\Component\Plugin\PluginInspectionInterface|\PHPUnit\Framework\MockObject\MockObject The mock plugin object.
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ LazyPluginCollectionTestBase.php, line 88
Class
- LazyPluginCollectionTestBase
- Provides a base class for plugin collection tests.
Namespace
Drupal\Tests\Core\PluginCode
public function returnPluginMap($plugin_id) {
if (isset($this->pluginInstances[$plugin_id])) {
return $this->pluginInstances[$plugin_id];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.