Nella theme
tabella c'è un type
campo con 3 possibili valori: fisico, virtuale e stadiazione.
Quando utilizzare il tema fisico virtuale e di gestione temporanea?
Quando ho esteso il tema luma, il mio nuovo tema appare nella tabella dei temi come tipo virtuale. Ma sembra che questo tipo non permetta di sovrascrivere alcuni file, e solo cambiando il tipo di tema da virtuale a fisico mi permetto di estendere ad esempio il Magento_Theme
pacchetto.
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 - ?