public function create(CategoryCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $category = new CategoryModel();

        $category
            ->setDispatcher($dispatcher)

            ->setLocale($event->getLocale())
            ->setParent($event->getParent())
            ->setVisible($event->getVisible())
            ->setTitle($event->getTitle())

            ->save()
        ;

        $event->setCategory($category);
    }
public function create(CategoryCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $category = new CategoryModel();

        $category
            ->setDispatcher($dispatcher)

            ->setLocale($event->getLocale())
            ->setParent($event->getParent())
            ->setVisible($event->getVisible())
            ->setTitle($event->getTitle())

            ->save()
        ;

        $event->setCategory($category);
    }
public function create ( CategoryCreateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { $ category = new CategoryModel ( ) ; $ category -> setDispatcher ( $ dispatcher ) -> setLocale ( $ event -> getLocale ( ) ) -> setParent ( $ event -> getParent ( ) ) -> setVisible ( $ event -> getVisible ( ) ) -> setTitle ( $ event -> getTitle ( ) ) -> save ( ) ; $ event -> setCategory ( $ category ) ; }
Create a new category entry

@param \Thelia\Core\Event\Category\CategoryCreateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Create a new category entry