Commit 38e9b30c authored by webchick's avatar webchick
Browse files

Issue #1851706 by yched, effulgentsia, tim.plunkett: Fixed Make all core...

Issue #1851706 by yched, effulgentsia, tim.plunkett: Fixed Make all core plugin managers be consistent as to whether  or ->discovery is passed to the factory.
parent 0aa731a7
...@@ -38,7 +38,7 @@ public function __construct() { ...@@ -38,7 +38,7 @@ public function __construct() {
$this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info'); $this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info');
$this->discovery = new CacheDecorator($this->discovery, 'field_formatter_types', 'field'); $this->discovery = new CacheDecorator($this->discovery, 'field_formatter_types', 'field');
$this->factory = new FormatterFactory($this); $this->factory = new FormatterFactory($this->discovery);
} }
/** /**
......
...@@ -39,7 +39,7 @@ public function __construct() { ...@@ -39,7 +39,7 @@ public function __construct() {
$this->discovery = new AlterDecorator($this->discovery, 'field_widget_info'); $this->discovery = new AlterDecorator($this->discovery, 'field_widget_info');
$this->discovery = new CacheDecorator($this->discovery, 'field_widget_types', 'field'); $this->discovery = new CacheDecorator($this->discovery, 'field_widget_types', 'field');
$this->factory = new WidgetFactory($this); $this->factory = new WidgetFactory($this->discovery);
} }
/** /**
......
...@@ -31,6 +31,6 @@ public function __construct() { ...@@ -31,6 +31,6 @@ public function __construct() {
$this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
$this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
$this->factory = new ReflectionFactory($this); $this->factory = new ReflectionFactory($this->discovery);
} }
} }
...@@ -23,7 +23,7 @@ class ResourcePluginManager extends PluginManagerBase { ...@@ -23,7 +23,7 @@ class ResourcePluginManager extends PluginManagerBase {
public function __construct() { public function __construct() {
// Create resource plugin derivatives from declaratively defined resources. // Create resource plugin derivatives from declaratively defined resources.
$this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource')); $this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource'));
$this->factory = new ReflectionFactory($this); $this->factory = new ReflectionFactory($this->discovery);
} }
/** /**
......
...@@ -29,7 +29,7 @@ public function __construct() { ...@@ -29,7 +29,7 @@ public function __construct() {
$this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
$this->discovery = new AlterDecorator($this->discovery, 'plugin_ui'); $this->discovery = new AlterDecorator($this->discovery, 'plugin_ui');
$this->discovery = new CacheDecorator($this->discovery, 'plugin_ui'); $this->discovery = new CacheDecorator($this->discovery, 'plugin_ui');
$this->factory = new DefaultFactory($this); $this->factory = new DefaultFactory($this->discovery);
} }
/** /**
......
...@@ -24,7 +24,7 @@ public function __construct() { ...@@ -24,7 +24,7 @@ public function __construct() {
// mock plugins for unit testing. // mock plugins for unit testing.
$this->discovery = new StaticDiscovery(); $this->discovery = new StaticDiscovery();
$this->discovery = new ProcessDecorator($this->discovery, array($this, 'ProcessDefinition')); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'ProcessDefinition'));
$this->factory = new DefaultFactory($this); $this->factory = new DefaultFactory($this->discovery);
// Specify default values. // Specify default values.
$this->defaults = array( $this->defaults = array(
......
...@@ -30,7 +30,7 @@ public function __construct($type) { ...@@ -30,7 +30,7 @@ public function __construct($type) {
$this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type); $this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type);
$this->discovery = new CacheDecorator($this->discovery, 'views:' . $type, 'views_info'); $this->discovery = new CacheDecorator($this->discovery, 'views:' . $type, 'views_info');
$this->factory = new DefaultFactory($this); $this->factory = new DefaultFactory($this->discovery);
$this->defaults += array( $this->defaults += array(
'parent' => 'parent', 'parent' => 'parent',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment