/** * Create a new attribute entry * * @param AttributeCreateEvent $event */ public function create(AttributeCreateEvent $event) { $attribute = new AttributeModel(); $attribute->setDispatcher($event->getDispatcher())->setLocale($event->getLocale())->setTitle($event->getTitle())->save(); $event->setAttribute($attribute); // Add atribute to all product templates if required if ($event->getAddToAllTemplates() != 0) { $this->doAddToAllTemplates($attribute); } }