该theme
表中的type
字段包含3个可能的值:物理,虚拟和分段。
何时使用物理虚拟和暂存主题?
当我扩展亮度主题时,我的新主题将以虚拟类型出现在主题表中。但是看起来这种类型不允许覆盖某些文件,并且仅将主题类型从虚拟更改为物理允许我扩展示例Magento_Theme
包。
请参阅
—
Ankit Shah
vendor\magento\module-theme\Model\Theme\Registration.php
/** Allowed sequence relation by type, array(parent theme, child theme) * @var array */ protected $_allowedRelations = [ [ThemeInterface::TYPE_PHYSICAL, ThemeInterface::TYPE_VIRTUAL], [ThemeInterface::TYPE_VIRTUAL, ThemeInterface::TYPE_STAGING],]; /** Forbidden sequence relation by type ** @var array*/ protected $_forbiddenRelations = [[ThemeInterface::TYPE_VIRTUAL, ThemeInterface::TYPE_VIRTUAL],[ThemeInterface::TYPE_PHYSICAL, ThemeInterface::TYPE_STAGING],];
0: Physical - Magento Default Theme (Example: Magento Blank, Magento Luma, Magento 2 Backend) 1: Virtual - Custom Theme which is created by you (custom) which has parent as Default Theme (Example: My Theme) 2: Staging - ?