/**
* {@inheritdoc}
*/
public function createInstance($plugin_id, array
$configuration =
[]) { // If this PluginManager has fallback capabilities catch
// PluginNotFoundExceptions.
if ($this instanceof FallbackPluginManagerInterface
) { try { return $this->
getFactory()->
createInstance($plugin_id,
$configuration);
} catch (PluginNotFoundException
$e) { return $this->
handlePluginNotFound($plugin_id,
$configuration);
} } else { return $this->
getFactory()->
createInstance($plugin_id,
$configuration);
} } /**
* Allows plugin managers to specify custom behavior if a plugin is not found.
*
* @param string $plugin_id
* The ID of the missing requested plugin.
* @param array $configuration
* An array of configuration relevant to the plugin instance.
*
* @return object
* A fallback plugin instance.
*
* @throws \BadMethodCallException
* When ::getFallbackPluginId() is not implemented in the concrete plugin
* manager class.
*/