本文整理匯總了PHP中Magento\Framework\View\Design\ThemeInterface::isPhysical方法的典型用法代碼示例。如果您正苦於以下問題:PHP ThemeInterface::isPhysical方法的具體用法?PHP ThemeInterface::isPhysical怎麽用?PHP ThemeInterface::isPhysical使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\View\Design\ThemeInterface
的用法示例。
在下文中一共展示了ThemeInterface::isPhysical方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getThemeFilesPath
/**
* Get directory where themes files are stored
*
* @return null|string
*/
public function getThemeFilesPath()
{
return $this->theme->isPhysical() ? $this->customizationPath->getThemeFilesPath($this->theme) : $this->customizationPath->getCustomizationPath($this->theme);
}
示例2: getParentConfigs
/**
* Recursively add parent theme configs
*
* @param ThemeInterface $theme
* @param array $iterator
* @param int $index
* @return array
*/
private function getParentConfigs(ThemeInterface $theme, array $iterator, $index = 0)
{
if ($theme->getParentTheme() && $theme->isPhysical()) {
$parentDesignPath = $this->resolver->resolve(RulePool::TYPE_FILE, 'etc/view.xml', $this->area, $theme->getParentTheme());
$parentDom = new \DOMDocument();
$parentDom->load($parentDesignPath);
$iterator[$index] = $parentDom->saveXML();
$iterator = $this->getParentConfigs($theme->getParentTheme(), $iterator, ++$index);
}
return $iterator;
}
示例3: getPreviewImagePath
/**
* Get path to preview image
*
* @param \Magento\Core\Model\Theme|ThemeInterface $theme
* @return string
*/
public function getPreviewImagePath(ThemeInterface $theme)
{
return $theme->isPhysical() ? $this->assetRepo->createAsset($theme->getPreviewImage(), ['area' => $theme->getData('area'), 'themeModel' => $theme])->getSourceFile() : $this->mediaDirectory->getAbsolutePath(self::PREVIEW_DIRECTORY_PATH . '/' . $theme->getPreviewImage());
}