function BlockManager::getFallbackPluginId

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getFallbackPluginId()
  2. 8.9.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getFallbackPluginId()
  3. 11.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getFallbackPluginId()

Gets a fallback id for a missing plugin.

This method should be implemented in extending classes that also implement FallbackPluginManagerInterface. It is called by PluginManagerBase::handlePluginNotFound on the abstract class, and therefore should be defined as well on the abstract class to prevent static analysis errors.

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 PluginManagerBase::getFallbackPluginId

File

core/lib/Drupal/Core/Block/BlockManager.php, line 85

Class

BlockManager
Manages discovery and instantiation of block plugins.

Namespace

Drupal\Core\Block

Code

public function getFallbackPluginId($plugin_id, array $configuration = []) {
    return 'broken';
}

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