class StubFallbackPluginManager in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Plugin/StubFallbackPluginManager.php \Drupal\Tests\Component\Plugin\StubFallbackPluginManager
Stubs \Drupal\Component\Plugin\FallbackPluginManagerInterface.
We have to stub \Drupal\Component\Plugin\FallbackPluginManagerInterface for \Drupal\Tests\Component\Plugin\PluginManagerBaseTest so that we can implement ::getFallbackPluginId().
We do this so we can have it just return the plugin ID passed to it, with '_fallback' appended.
Hierarchy
- class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTrait
- class \Drupal\Tests\Component\Plugin\StubFallbackPluginManager implements FallbackPluginManagerInterface
Expanded class hierarchy of StubFallbackPluginManager
File
- core/
tests/ Drupal/ Tests/ Component/ Plugin/ StubFallbackPluginManager.php, line 23 - Contains \Drupal\Tests\Component\Plugin\StubFallbackPluginManager.
Namespace
Drupal\Tests\Component\PluginView source
class StubFallbackPluginManager extends PluginManagerBase implements FallbackPluginManagerInterface {
/**
* {@inheritdoc}
*/
public function getFallbackPluginId($plugin_id, array $configuration = array()) {
// Minimally implement getFallbackPluginId so that we can test it.
return $plugin_id . '_fallback';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryTrait:: |
protected | function | Gets a specific plugin definition. | |
DiscoveryTrait:: |
public | function | ||
PluginManagerBase:: |
protected | property | The object that discovers plugins managed by this manager. | |
PluginManagerBase:: |
protected | property | The object that instantiates plugins managed by this manager. | |
PluginManagerBase:: |
protected | property | The object that returns the preconfigured plugin instance appropriate for a particular runtime condition. | |
PluginManagerBase:: |
public | function |
Creates a pre-configured instance of a plugin. Overrides FactoryInterface:: |
11 |
PluginManagerBase:: |
public | function |
Gets a specific plugin definition. Overrides DiscoveryTrait:: |
|
PluginManagerBase:: |
public | function |
Gets the definition of all plugins for this type. Overrides DiscoveryTrait:: |
|
PluginManagerBase:: |
protected | function | Gets the plugin discovery. | 1 |
PluginManagerBase:: |
protected | function | Gets the plugin factory. | 1 |
PluginManagerBase:: |
public | function |
Gets a preconfigured instance of a plugin. Overrides MapperInterface:: |
7 |
StubFallbackPluginManager:: |
public | function |
Gets a fallback id for a missing plugin. Overrides FallbackPluginManagerInterface:: |