public function onTemplateCreated(TemplateEvent $event)
    {
        $template = $event->getTemplate();
        $zones = $template->getZones();
        foreach ($template->getTemplateType()->getZoneTypes() as $zoneType) {
            if ($zones->search(array('zoneType' => $zoneType))->isEmpty()) {
                if (null === $this->zoneDomain) {
                    throw new \DomainException('No zoneDomain was set, you are unable to update your configuration.');
                }

                $zones->add($this->zoneDomain->create($zoneType));
            }
        }
        $template->setZones($zones);
    }