Пример #1
0
 /**
  * Create 'staging' theme associated with current 'virtual' theme
  *
  * @return \Magento\Framework\View\Design\ThemeInterface
  */
 protected function _createStagingTheme()
 {
     $stagingTheme = $this->_themeFactory->create();
     $stagingTheme->setData(['parent_id' => $this->_theme->getId(), 'theme_path' => null, 'theme_title' => sprintf('%s - Staging', $this->_theme->getThemeTitle()), 'preview_image' => $this->_theme->getPreviewImage(), 'is_featured' => $this->_theme->getIsFeatured(), 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING]);
     $stagingTheme->save();
     return $stagingTheme;
 }