0

Physical themes Magento changes to virtual theme when you change branch on git it is at 1 on the database it should be set to 0.

 /** * Checks all physical themes that they were not deleted * * @return $this */ public function checkPhysicalThemes() { $themes = $this->_collectionFactory->create()->addTypeFilter(ThemeInterface::TYPE_PHYSICAL); /** @var $theme ThemeInterface */ foreach ($themes as $theme) { if (!$this->_themeCollection->hasTheme($theme)) { $theme->setType(ThemeInterface::TYPE_VIRTUAL)->save(); } } return $this; } 

1 Answer 1

0

I managed to change the virtual into physical

/** * Checks all physical themes that they were not deleted * * @return $this */ public function checkPhysicalThemes() { $themes = $this->_collectionFactory->create(); /** @var $theme ThemeInterface */ foreach ($themes as $theme) { // reset theme type == virtual || theme type == physicial if (!$this->_themeCollection->hasTheme($theme)) { $theme->setType(ThemeInterface::TYPE_VIRTUAL)->save(); } else { $theme->setType(ThemeInterface::TYPE_PHYSICAL)->save(); } } return $this; } 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.