本文整理汇总了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'));
}