You are here

public function StubFallbackPluginManager::getFallbackPluginId in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Plugin/StubFallbackPluginManager.php \Drupal\Tests\Component\Plugin\StubFallbackPluginManager::getFallbackPluginId()

Gets a fallback id for a missing plugin.

Parameters

string $plugin_id: The ID of the missing requested plugin.

array $configuration: An array of configuration relevant to the plugin instance.

Return value

string The id of an existing plugin to use when the plugin does not exist.

Overrides FallbackPluginManagerInterface::getFallbackPluginId

File

core/tests/Drupal/Tests/Component/Plugin/StubFallbackPluginManager.php, line 23

Class

StubFallbackPluginManager
Stubs \Drupal\Component\Plugin\FallbackPluginManagerInterface.

Namespace

Drupal\Tests\Component\Plugin

Code

public function getFallbackPluginId($plugin_id, array $configuration = []) {

  // Minimally implement getFallbackPluginId so that we can test it.
  return $plugin_id . '_fallback';
}