Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c783542c
Commit
c783542c
authored
Dec 17, 2012
by
catch
Browse files
Issue
#1862344
by damiankloip, tim.plunkett: Combine the Views plugin managers.
parent
206598cc
Changes
6
Hide whitespace changes
Inline
Side-by-side
core/modules/views/lib/Drupal/views/Plugin/
Typ
e/DefaultWizardDeriver.php
→
core/modules/views/lib/Drupal/views/Plugin/
Derivativ
e/DefaultWizardDeriver.php
View file @
c783542c
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of
Drupal\views\Plugin\
Typ
e\DefaultWizardDeriver.
*
Contains \
Drupal\views\Plugin\
Derivativ
e\DefaultWizardDeriver.
*/
namespace
Drupal\views\Plugin\
Typ
e
;
namespace
Drupal\views\Plugin\
Derivativ
e
;
use
Drupal\Component\Plugin\Derivative\DerivativeInterface
;
...
...
core/modules/views/lib/Drupal/views/Plugin/Type/JoinManager.php
deleted
100644 → 0
View file @
206598cc
<?php
/**
* @file
* Definition of Drupal\views\Plugin\Type\JoinManager.
*/
namespace
Drupal\views\Plugin\Type
;
use
Drupal\Component\Plugin\PluginManagerBase
;
use
Drupal\Component\Plugin\Factory\DefaultFactory
;
use
Drupal\Component\Plugin\Discovery\ProcessDecorator
;
use
Drupal\Core\Plugin\Discovery\AlterDecorator
;
use
Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery
;
use
Drupal\Core\Plugin\Discovery\CacheDecorator
;
class
JoinManager
extends
PluginManagerBase
{
/**
* Constructs a JoinManager object.
*/
public
function
__construct
()
{
$this
->
discovery
=
new
AnnotatedClassDiscovery
(
'views'
,
'join'
);
$this
->
discovery
=
new
AlterDecorator
(
$this
->
discovery
,
'views_plugins_join'
);
$this
->
discovery
=
new
ProcessDecorator
(
$this
->
discovery
,
array
(
$this
,
'processDefinition'
));
$this
->
discovery
=
new
CacheDecorator
(
$this
->
discovery
,
'views:join'
,
'views_info'
);
$this
->
factory
=
new
DefaultFactory
(
$this
);
$this
->
defaults
=
array
(
'module'
=>
'views'
,
);
}
}
core/modules/views/lib/Drupal/views/Plugin/Type/WizardManager.php
deleted
100644 → 0
View file @
206598cc
<?php
/**
* @file
* Definition of Drupal\views\Plugin\Type\WizardManager.
*/
namespace
Drupal\views\Plugin\Type
;
use
Drupal\Component\Plugin\PluginManagerBase
;
use
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator
;
use
Drupal\Component\Plugin\Discovery\ProcessDecorator
;
use
Drupal\Component\Plugin\Factory\DefaultFactory
;
use
Drupal\Core\Plugin\Discovery\AlterDecorator
;
use
Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery
;
use
Drupal\Core\Plugin\Discovery\CacheDecorator
;
class
WizardManager
extends
PluginManagerBase
{
/**
* Constructs a WizardManager object.
*/
public
function
__construct
()
{
$this
->
discovery
=
new
AnnotatedClassDiscovery
(
'views'
,
'wizard'
);
$this
->
discovery
=
new
AlterDecorator
(
$this
->
discovery
,
'views_plugins_wizard'
);
$this
->
discovery
=
new
ProcessDecorator
(
$this
->
discovery
,
array
(
$this
,
'processDefinition'
));
$this
->
discovery
=
new
DerivativeDiscoveryDecorator
(
$this
->
discovery
);
$this
->
discovery
=
new
CacheDecorator
(
$this
->
discovery
,
'views:wizard'
,
'views_info'
);
$this
->
factory
=
new
DefaultFactory
(
$this
);
$this
->
defaults
=
array
(
'module'
=>
'views'
,
);
}
}
core/modules/views/lib/Drupal/views/Plugin/
Type/
PluginManager.php
→
core/modules/views/lib/Drupal/views/Plugin/
Views
PluginManager.php
View file @
c783542c
...
...
@@ -2,30 +2,36 @@
/**
* @file
*
Definition of
Drupal\views\Plugin\
Type\
PluginManager.
*
Contains \
Drupal\views\Plugin\
Views
PluginManager.
*/
namespace
Drupal\views\Plugin
\Type
;
namespace
Drupal\views\Plugin
;
use
Drupal\Component\Plugin\PluginManagerBase
;
use
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator
;
use
Drupal\Component\Plugin\Factory\DefaultFactory
;
use
Drupal\Component\Plugin\Discovery\ProcessDecorator
;
use
Drupal\Core\Plugin\Discovery\AlterDecorator
;
use
Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery
;
use
Drupal\Core\Plugin\Discovery\CacheDecorator
;
class
PluginManager
extends
PluginManagerBase
{
/**
* Plugin type manager for all views plugins.
*/
class
ViewsPluginManager
extends
PluginManagerBase
{
/**
* Constructs a PluginManager object.
* Constructs a
Views
PluginManager object.
*/
public
function
__construct
(
$type
)
{
$this
->
discovery
=
new
AnnotatedClassDiscovery
(
'views'
,
$type
);
$this
->
discovery
=
new
Alt
erDecorator
(
$this
->
discovery
,
'views_plugins_'
.
$type
);
$this
->
discovery
=
new
DerivativeDiscov
er
y
Decorator
(
$this
->
discovery
);
$this
->
discovery
=
new
ProcessDecorator
(
$this
->
discovery
,
array
(
$this
,
'processDefinition'
));
$this
->
discovery
=
new
AlterDecorator
(
$this
->
discovery
,
'views_plugins_'
.
$type
);
$this
->
discovery
=
new
CacheDecorator
(
$this
->
discovery
,
'views:'
.
$type
,
'views_info'
);
$this
->
factory
=
new
DefaultFactory
(
$this
);
$this
->
defaults
+=
array
(
'parent'
=>
'parent'
,
'plugin_type'
=>
$type
,
...
...
core/modules/views/lib/Drupal/views/Plugin/views/wizard/Standard.php
View file @
c783542c
...
...
@@ -12,7 +12,7 @@
/**
* @Plugin(
* id = "standard",
* derivative = "Drupal\views\Plugin\
Typ
e\DefaultWizardDeriver"
* derivative = "Drupal\views\Plugin\
Derivativ
e\DefaultWizardDeriver"
* )
*/
class
Standard
extends
WizardPluginBase
{
...
...
core/modules/views/lib/Drupal/views/ViewsBundle.php
View file @
c783542c
...
...
@@ -21,16 +21,8 @@ class ViewsBundle extends Bundle {
*/
public
function
build
(
ContainerBuilder
$container
)
{
foreach
(
ViewExecutable
::
getPluginTypes
()
as
$type
)
{
if
(
$type
==
'join'
)
{
$container
->
register
(
'plugin.manager.views.join'
,
'Drupal\views\Plugin\Type\JoinManager'
);
}
elseif
(
$type
==
'wizard'
)
{
$container
->
register
(
'plugin.manager.views.wizard'
,
'Drupal\views\Plugin\Type\WizardManager'
);
}
else
{
$container
->
register
(
"plugin.manager.views.
$type
"
,
'Drupal\views\Plugin\Type\PluginManager'
)
->
addArgument
(
$type
);
}
$container
->
register
(
"plugin.manager.views.
$type
"
,
'Drupal\views\Plugin\ViewsPluginManager'
)
->
addArgument
(
$type
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment