Beispiel #1
0
 /**
  * Delete a product feature entry
  *
  * @param FeatureDeleteEvent $event
  * @param $eventName
  * @param EventDispatcherInterface $dispatcher
  */
 public function delete(FeatureDeleteEvent $event, $eventName, EventDispatcherInterface $dispatcher)
 {
     if (null !== ($feature = FeatureQuery::create()->findPk($event->getFeatureId()))) {
         $feature->setDispatcher($dispatcher)->delete();
         $event->setFeature($feature);
     }
 }
Beispiel #2
0
 /**
  * Delete a product feature entry
  *
  * @param FeatureDeleteEvent $event
  */
 public function delete(FeatureDeleteEvent $event)
 {
     if (null !== ($feature = FeatureQuery::create()->findPk($event->getFeatureId()))) {
         $feature->setDispatcher($event->getDispatcher())->delete();
         $event->setFeature($feature);
     }
 }