Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
411dc59a
Commit
411dc59a
authored
May 27, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2002232
by kim.pepper: Cleanup PluginManagerBase.
parent
e6147874
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
core/lib/Drupal/Component/Plugin/PluginManagerBase.php
core/lib/Drupal/Component/Plugin/PluginManagerBase.php
+9
-9
No files found.
core/lib/Drupal/Component/Plugin/PluginManagerBase.php
View file @
411dc59a
...
...
@@ -18,21 +18,21 @@ abstract class PluginManagerBase implements PluginManagerInterface, CachedDiscov
/**
* The object that discovers plugins managed by this manager.
*
* @var Drupal\Component\Plugin\Discovery\DiscoveryInterface
* @var
\
Drupal\Component\Plugin\Discovery\DiscoveryInterface
*/
protected
$discovery
;
/**
* The object that instantiates plugins managed by this manager.
*
* @var Drupal\Component\Plugin\Factory\FactoryInterface
* @var
\
Drupal\Component\Plugin\Factory\FactoryInterface
*/
protected
$factory
;
/**
* The object that returns the preconfigured plugin instance appropriate for a particular runtime condition.
*
* @var Drupal\Component\Plugin\Mapper\MapperInterface
* @var
\
Drupal\Component\Plugin\Mapper\MapperInterface
*/
protected
$mapper
;
...
...
@@ -46,21 +46,21 @@ abstract class PluginManagerBase implements PluginManagerInterface, CachedDiscov
protected
$defaults
=
array
();
/**
*
Implements Drupal\Component\Plugin\PluginManagerInterface::getDefinition().
*
{@inheritdoc}
*/
public
function
getDefinition
(
$plugin_id
)
{
return
$this
->
discovery
->
getDefinition
(
$plugin_id
);
;
return
$this
->
discovery
->
getDefinition
(
$plugin_id
);
}
/**
*
Implements Drupal\Component\Plugin\PluginManagerInterface::getDefinitions().
*
{@inheritdoc}
*/
public
function
getDefinitions
()
{
return
$this
->
discovery
->
getDefinitions
();
}
/**
*
Implements \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface::clearCachedDefinitions().
*
{@inheritdoc}
*/
public
function
clearCachedDefinitions
()
{
if
(
$this
->
discovery
instanceof
CachedDiscoveryInterface
)
{
...
...
@@ -69,14 +69,14 @@ public function clearCachedDefinitions() {
}
/**
*
Implements Drupal\Component\Plugin\PluginManagerInterface::createInstance().
*
{@inheritdoc}
*/
public
function
createInstance
(
$plugin_id
,
array
$configuration
=
array
())
{
return
$this
->
factory
->
createInstance
(
$plugin_id
,
$configuration
);
}
/**
*
Implements Drupal\Component\Plugin\PluginManagerInterface::getInstance().
*
{@inheritdoc}
*/
public
function
getInstance
(
array
$options
)
{
return
$this
->
mapper
->
getInstance
(
$options
);
...
...
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