StaticDiscovery.php in Service Container 7.2
File
lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php
View source
<?php
namespace Drupal\Component\Plugin\Discovery;
class StaticDiscovery implements DiscoveryInterface {
use DiscoveryCachedTrait;
public function getDefinitions() {
if (!$this->definitions) {
$this->definitions = array();
}
return $this->definitions;
}
public function setDefinition($plugin, $definition) {
$this->definitions[$plugin] = $definition;
}
public function deleteDefinition($plugin) {
unset($this->definitions[$plugin]);
}
}
Classes
Name |
Description |
StaticDiscovery |
A discovery mechanism that allows plugin definitions to be manually
registered rather than actively discovered. |