class PluginManager

Hierarchy

Expanded class hierarchy of PluginManager

File

drupal/core/modules/views/lib/Drupal/views/Plugin/Type/PluginManager.php, line 17
Definition of Drupal\views\Plugin\Type\PluginManager.

Namespace

Drupal\views\Plugin\Type
View source
class PluginManager extends PluginManagerBase {

  /**
   * Constructs a PluginManager object.
   */
  public function __construct($type) {
    $this->discovery = new AnnotatedClassDiscovery('views', $type);
    $this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type);
    $this->discovery = new ProcessDecorator($this->discovery, array(
      $this,
      'processDefinition',
    ));
    $this->discovery = new CacheDecorator($this->discovery, 'views:' . $type, 'views_info');
    $this->factory = new DefaultFactory($this);
    $this->defaults += array(
      'parent' => 'parent',
      'plugin_type' => $type,
      'module' => 'views',
    );
  }

  /**
   * Overrides Drupal\Component\Plugin\PluginManagerBase::processDefinition().
   */
  public function processDefinition(&$definition, $plugin_id) {
    parent::processDefinition($definition, $plugin_id);

    // Setup automatic path/file finding for theme registration.
    if ($definition['module'] == 'views' || isset($definition['theme'])) {
      $definition += array(
        'theme path' => drupal_get_path('module', 'views') . '/theme',
        'theme file' => 'theme.inc',
      );
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginManager::processDefinition public function Overrides Drupal\Component\Plugin\PluginManagerBase::processDefinition(). Overrides PluginManagerBase::processDefinition
PluginManager::__construct public function Constructs a PluginManager object.
PluginManagerBase::$defaults protected property A set of defaults to be referenced by $this->processDefinition() if additional processing of plugins is necessary or helpful for development purposes. 4
PluginManagerBase::$discovery protected property The object that discovers plugins managed by this manager.
PluginManagerBase::$factory protected property The object that instantiates plugins managed by this manager.
PluginManagerBase::$mapper protected property The object that returns the preconfigured plugin instance appropriate for a particular runtime condition.
PluginManagerBase::clearCachedDefinitions public function Implements \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface::clearCachedDefinitions(). Overrides CachedDiscoveryInterface::clearCachedDefinitions
PluginManagerBase::createInstance public function Implements Drupal\Component\Plugin\PluginManagerInterface::createInstance(). Overrides FactoryInterface::createInstance 1
PluginManagerBase::getDefinition public function Implements Drupal\Component\Plugin\PluginManagerInterface::getDefinition(). Overrides DiscoveryInterface::getDefinition 1
PluginManagerBase::getDefinitions public function Implements Drupal\Component\Plugin\PluginManagerInterface::getDefinitions(). Overrides DiscoveryInterface::getDefinitions 1
PluginManagerBase::getInstance public function Implements Drupal\Component\Plugin\PluginManagerInterface::getInstance(). Overrides MapperInterface::getInstance 3