Expanded class hierarchy of PluginManager
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',
);
}
}
}