Example #1
0
 /**
  * Change a product attribute
  *
  * @param \Thelia\Core\Event\Attribute\AttributeAvUpdateEvent $event
  */
 public function update(AttributeAvUpdateEvent $event)
 {
     if (null !== ($attribute = AttributeAvQuery::create()->findPk($event->getAttributeAvId()))) {
         $attribute->setDispatcher($event->getDispatcher())->setLocale($event->getLocale())->setTitle($event->getTitle())->setDescription($event->getDescription())->setChapo($event->getChapo())->setPostscriptum($event->getPostscriptum())->save();
         $event->setAttributeAv($attribute);
     }
 }