示例#1
0
 /**
  * Get virtual theme title
  *
  * @param \Magento\Framework\View\Design\ThemeInterface $theme
  * @return string
  */
 protected function _getVirtualThemeTitle($theme)
 {
     $themeCopyCount = $this->_themeCollection->addAreaFilter(\Magento\Framework\App\Area::AREA_FRONTEND)->addTypeFilter(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL)->addFilter('parent_id', $theme->getId())->count();
     $title = sprintf("%s - %s #%s", $theme->getThemeTitle(), __('Copy'), $themeCopyCount + 1);
     return $title;
 }