Beispiel #1
0
 /**
  * Delete a product attribute entry
  *
  * @param AttributeDeleteEvent $event
  */
 public function delete(AttributeDeleteEvent $event)
 {
     if (null !== ($attribute = AttributeQuery::create()->findPk($event->getAttributeId()))) {
         $attribute->setDispatcher($event->getDispatcher())->delete();
         $event->setAttribute($attribute);
     }
 }
Beispiel #2
0
 /**
  * Delete a product attribute entry
  *
  * @param AttributeDeleteEvent $event
  * @param $eventName
  * @param EventDispatcherInterface $dispatcher
  */
 public function delete(AttributeDeleteEvent $event, $eventName, EventDispatcherInterface $dispatcher)
 {
     if (null !== ($attribute = AttributeQuery::create()->findPk($event->getAttributeId()))) {
         $attribute->setDispatcher($dispatcher)->delete();
         $event->setAttribute($attribute);
     }
 }