コード例 #1
0
ファイル: Repository.php プロジェクト: pavelnovitsky/magento2
 /**
  * Get current context for static view files
  *
  * @return \Magento\Framework\View\Asset\ContextInterface
  */
 public function getStaticViewFileContext()
 {
     $params = array();
     $this->updateDesignParams($params);
     $themePath = $this->design->getThemePath($params['themeModel']);
     return $this->getFallbackContext(UrlInterface::URL_TYPE_STATIC, null, $params['area'], $themePath, $params['locale']);
 }
コード例 #2
0
ファイル: FileResolver.php プロジェクト: razbakov/magento2
 /**
  * @param Reader $moduleReader
  * @param FileIteratorFactory $iteratorFactory
  * @param DesignInterface $designInterface
  * @param DirectoryList $directoryList
  * @param Filesystem $filesystem
  * @param ComponentRegistrar $componentRegistrar
  */
 public function __construct(
     Reader $moduleReader,
     FileIteratorFactory $iteratorFactory,
     DesignInterface $designInterface,
     DirectoryList $directoryList,
     Filesystem $filesystem,
     ComponentRegistrar $componentRegistrar
 ) {
     $this->directoryList = $directoryList;
     $this->iteratorFactory = $iteratorFactory;
     $this->moduleReader = $moduleReader;
     $this->currentTheme = $designInterface->getDesignTheme();
     $this->themePath = $designInterface->getThemePath($this->currentTheme);
     $this->area = $designInterface->getArea();
     $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
     $this->componentRegistrar = $componentRegistrar;
 }