コード例 #1
0
ファイル: Context.php プロジェクト: shabbirvividads/magento2
 /**
  * Set theme which will be editable in store designer
  *
  * @param int $themeId
  * @return $this
  * @throws CoreException
  */
 public function setEditableThemeById($themeId)
 {
     $this->_theme = $this->_themeFactory->create();
     if (!$this->_theme->load($themeId)->getId()) {
         throw new CoreException(__('We can\'t find theme "%1".', $themeId));
     }
     if ($this->_theme->getType() === \Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING) {
         throw new CoreException(__('Wrong theme type set as editable'));
     }
     return $this;
 }