當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ThemeHandlerInterface::getThemeDirectories方法代碼示例

本文整理匯總了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;
 }
開發者ID:andypost,項目名稱:jcaurucel,代碼行數:11,代碼來源:jCarouselSkinsManager.php

示例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');
 }
開發者ID:AllieRays,項目名稱:debugging-drupal-8,代碼行數:25,代碼來源:LayoutPluginManager.php

示例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'));
 }
開發者ID:nstielau,項目名稱:drops-8,代碼行數:23,代碼來源:BreakpointManager.php


注:本文中的Drupal\Core\Extension\ThemeHandlerInterface::getThemeDirectories方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。