Ejemplo n.º 1
0
 /**
  * Save time stamp of last change
  *
  * @param EventObserver $event
  * @return void
  */
 public function saveChangeTime($event)
 {
     /** @var $theme \Magento\Theme\Model\Theme|null */
     $theme = $event->getTheme() ?: $event->getDataObject()->getTheme();
     /** @var $change \Magento\DesignEditor\Model\Theme\Change */
     $change = $this->objectManager->create('Magento\\DesignEditor\\Model\\Theme\\Change');
     if ($theme && $theme->getId()) {
         $change->loadByThemeId($theme->getId());
         $change->setThemeId($theme->getId())->setChangeTime(null);
         $change->save();
     }
 }