You are here

public function DisplayBuilderManager::createInstance in Panels 8.3

Same name and namespace in other branches
  1. 8.4 src/Plugin/DisplayBuilder/DisplayBuilderManager.php \Drupal\panels\Plugin\DisplayBuilder\DisplayBuilderManager::createInstance()

Creates a pre-configured instance of a plugin.

Parameters

string $plugin_id: The ID of the plugin being instantiated.

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

Return value

object A fully configured plugin instance.

Throws

\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.

Overrides PluginManagerBase::createInstance

File

src/Plugin/DisplayBuilder/DisplayBuilderManager.php, line 37

Class

DisplayBuilderManager
The display builder plugin manager.

Namespace

Drupal\panels\Plugin\DisplayBuilder

Code

public function createInstance($plugin_id, array $configuration = array()) {

  // Redirect the deprecated editor builder to use the standard builder.
  if ($plugin_id == 'editor') {
    return parent::createInstance('standard', $configuration);
  }
  return parent::createInstance($plugin_id, $configuration);
}