DisplayBuilderManager.php in Panels 8.4
File
src/Plugin/DisplayBuilder/DisplayBuilderManager.php
View source
<?php
namespace Drupal\panels\Plugin\DisplayBuilder;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\panels\Annotation\DisplayBuilder;
class DisplayBuilderManager extends DefaultPluginManager implements DisplayBuilderManagerInterface {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/DisplayBuilder', $namespaces, $module_handler, DisplayBuilderInterface::class, DisplayBuilder::class);
$this
->setCacheBackend($cache_backend, 'display_builder');
$this
->alterInfo('display_builder');
}
public function createInstance($plugin_id, array $configuration = array()) {
if ($plugin_id == 'editor') {
return parent::createInstance('standard', $configuration);
}
return parent::createInstance($plugin_id, $configuration);
}
}