public function onCreateZone(ZoneEvent $event)
    {
        $zone = $event->getZone();
        if ($zone->getComponents()->isEmpty()) {
            return;
        }

        $this->save($zone);
    }
public function onCreateZone(ZoneEvent $event)
    {
        $zone = $event->getZone();
        if ($zone->getComponents()->isEmpty()) {
            return;
        }

        $this->save($zone);
    }
public function onCreateZone ( ZoneEvent $ event ) { $ zone = $ event -> getZone ( ) ; if ( $ zone -> getComponents ( ) -> isEmpty ( ) ) { return ; } $ this -> save ( $ zone ) ; }
Zone creation event handler.
Triggers persistence call only if component was defined into it.

@param ZoneEvent $event
Zone creation event handler . Triggers persistence call only if component was defined into it .