예제 #1
0
 /**
  * Change a product feature
  *
  * @param \Thelia\Core\Event\Feature\FeatureUpdateEvent $event
  * @param $eventName
  * @param EventDispatcherInterface $dispatcher
  */
 public function update(FeatureUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
 {
     if (null !== ($feature = FeatureQuery::create()->findPk($event->getFeatureId()))) {
         $feature->setDispatcher($dispatcher)->setLocale($event->getLocale())->setTitle($event->getTitle())->setDescription($event->getDescription())->setChapo($event->getChapo())->setPostscriptum($event->getPostscriptum())->save();
         $event->setFeature($feature);
     }
 }