本文整理匯總了PHP中Drupal\Core\Extension\ThemeHandlerInterface::getThemeDirectories方法的典型用法代碼示例。如果您正苦於以下問題:PHP ThemeHandlerInterface::getThemeDirectories方法的具體用法?PHP ThemeHandlerInterface::getThemeDirectories怎麽用?PHP ThemeHandlerInterface::getThemeDirectories使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\Core\Extension\ThemeHandlerInterface
的用法示例。
在下文中一共展示了ThemeHandlerInterface::getThemeDirectories方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDiscovery
/**
* {@inheritdoc}
*/
protected function getDiscovery()
{
if (!isset($this->discovery)) {
$this->discovery = new YamlDiscovery('jcarousel.skins', $this->moduleHandler->getModuleDirectories() + $this->themeHandler->getThemeDirectories());
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
}
return $this->discovery;
}
示例2: __construct
/**
* Constructs a LayoutPluginManager 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.
* @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
* The theme handle to invoke the alter hook with.
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler)
{
$plugin_interface = 'Drupal\\layout_plugin\\Plugin\\Layout\\LayoutInterface';
$plugin_definition_annotation_name = 'Drupal\\layout_plugin\\Annotation\\Layout';
parent::__construct("Plugin/Layout", $namespaces, $module_handler, $plugin_interface, $plugin_definition_annotation_name);
$discovery = $this->getDiscovery();
$this->discovery = new YamlDiscoveryDecorator($discovery, 'layouts', $module_handler->getModuleDirectories() + $theme_handler->getThemeDirectories());
$this->themeHandler = $theme_handler;
$this->defaults += array('type' => 'page', 'class' => 'Drupal\\layout_plugin\\Plugin\\Layout\\LayoutDefault');
$this->setCacheBackend($cache_backend, 'layout');
$this->alterInfo('layout');
}
示例3: __construct
/**
* Constructs a new BreakpointManager instance.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
* @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
* The theme handler.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
* The cache backend.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation service.
*/
public function __construct(ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, CacheBackendInterface $cache_backend, TranslationInterface $string_translation)
{
$this->discovery = new YamlDiscovery('breakpoints', $module_handler->getModuleDirectories() + $theme_handler->getThemeDirectories());
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
$this->factory = new ContainerFactory($this);
$this->moduleHandler = $module_handler;
$this->themeHandler = $theme_handler;
$this->setStringTranslation($string_translation);
$this->alterInfo('breakpoints');
$this->setCacheBackend($cache_backend, 'breakpoints', array('breakpoints'));
}