You are here

protected function BlockManager::handlePluginNotFound in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::handlePluginNotFound()

Allows plugin managers to specify custom behavior if a plugin is not found.

Parameters

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

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

Return value

object A fallback plugin instance.

Overrides PluginManagerBase::handlePluginNotFound

File

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

Class

BlockManager
Manages discovery and instantiation of block plugins.

Namespace

Drupal\Core\Block

Code

protected function handlePluginNotFound($plugin_id, array $configuration) {
  $this->logger
    ->warning('The "%plugin_id" was not found', [
    '%plugin_id' => $plugin_id,
  ]);
  return parent::handlePluginNotFound($plugin_id, $configuration);
}