示例#1
0
 /**
  * Get theme model by theme path and area code
  *
  * @param string $themePath
  * @param string $areaCode
  * @return \Magento\Framework\View\Design\ThemeInterface
  */
 public function getThemeModel($themePath, $areaCode)
 {
     if ($this->appState->isInstalled()) {
         $themeModel = $this->flyweightFactory->create($themePath, $areaCode);
     } else {
         $themeModel = $this->themeList->getThemeByFullPath($areaCode . '/' . $themePath);
     }
     return $themeModel;
 }
示例#2
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Incorrect theme identification key
  */
 public function testNegativeCreate()
 {
     $this->factory->create(null);
 }