Zone creation event handler.
Triggers persistence call only if component was defined into it.

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

        $this->save($zone);
    }
516227
protected function apply(DomainEventInterface $event)
    {
        $handler = $this->determineEventHandlerMethodFor($event);

        if (!method_exists($this, $handler)) {
            return;
        }

        $this->{$handler}($event);
    }
666787
final protected static function triggerEvent($event, array $context = array())
	{
		if (array_key_exists($event, static::$registered_events)) {
			array_map(function($handler) use ($context)
			{
				call_user_func($handler, $context);
			}, static::$registered_events[$event]);
		}
	}
788437
public function startup($event)
    {
        // startup-event
        $_event = new Event('Component.Manager.startup', $this, [
        ]);
        $this->Controller->eventManager()->dispatch($_event);

        if ($this->isPrefix()) {
            $this->_runCallback("startup", $event);

            // startup-event with Prefix
            $this->_runEvent("startup");
        }
    }
808961
public function handle(DomainEvent $event) : void {
        $method = lcfirst($this->getShortName($event));
        if (method_exists($this, $method)) {
            $this->$method($event);
        }
    }
505435
public function onSchemaValidation(ConstraintEventSchema $event)
    {
        $this->currentSchema = $event->getSchema();
        $this->currentData = $event->getElement();
    }
177832
public function trigger(Event $event) {
    $request = $event->getTarget();
    
    $cachedRequest = new CachedRequest($request->getURL());
    $cachedRequest->setCachedResponse($event->getData()->response);
    $cachedRequest->setHeaders($event->getData()->headers);
    
    $this->addCachedRequest($cachedRequest);
  }
964812
@Override
    public void configurationEvent(ConfigurationEvent event) {
        if (event.getType() == ConfigurationEvent.CM_UPDATED && event.getPid().equals(pid)) {
            processProperties();
            initializeInterceptor();
        }

    }
149486
public function setStructureTypeToParent(PersistEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument
            || LocalizationState::GHOST === $this->documentInspector->getLocalizationState($document->getParent())
            || $document->getStructureType() === $document->getParent()->getStructureType()
        ) {
            return;
        }

        $document->getParent()->setStructureType($document->getStructureType());
        $this->documentManager->persist($document->getParent(), $event->getLocale());
    }
458927
public function keyChanged(PersistenceEvent $event) {
    $object = $event->getObject();
    if ($object->getType() == $this->entityType) {
      $cache = ObjectFactory::getInstance('dynamicCache');
      $cache->clear($this->getId());
    }
  }
38717
public function setNodeOnPersist(PersistEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument || $event->hasNode()) {
            return;
        }

        $pageTitle = $this->getPageTitle($document);

        // if no page-title exists use a unique-id
        $nodeName = $this->slugifier->slugify($pageTitle ?: uniqid('page-', true));
        $nodeName = $this->resolver->resolveName($event->getParentNode(), $nodeName);
        $node = $event->getParentNode()->addNode($nodeName);

        $event->setNode($node);
    }
1021037
public function postLoad(LifecycleEventArgs $event)
    {
        $entity = $event->getEntity();

        if (! ($entity instanceof Menu)) {
            return;
        }

        $builder = $this->builderRegistry->getBuilder($entity->getType());
        $entity->setBuilder($builder);
    }
1214871
public function onEvent(Event $event = null)
    {
        while (!empty($this->messages)) {
            $message = array_shift($this->messages);

            $this->handle($message, $this->dispatcher);
        }
    }
822401
public function createNodeInPublicWorkspace(PersistEvent $event)
    {
        $node = $event->getNode();

        if ($node->isNew()) {
            $this->createNodesWithUuid($node);

            return;
        }

        $liveNode = $this->getLiveNode($event->getDocument());
        $nodeName = $node->getName();

        if ($liveNode->getName() !== $nodeName) {
            $liveNode->rename($nodeName);
        }
    }
572409
public function setTimestampsOnNodeForPersist(PersistEvent $event)
    {
        $document = $event->getDocument();

        if (!$this->supports($document)) {
            return;
        }

        $this->setTimestampsOnNode(
            $document,
            $event->getNode(),
            $event->getAccessor(),
            $this->documentInspector->getOriginalLocale($document),
            new \DateTime()
        );
    }
161034
public function onKernelRequest(GetResponseEvent $event)
    {
        $request = $event->getRequest();

        foreach ($this->requestMatchers as $requestMatcher) {
            if ($requestMatcher->matches($request)) {
                $request->attributes->set(FOSRestBundle::ZONE_ATTRIBUTE, true);

                return;
            }
        }

        $request->attributes->set(FOSRestBundle::ZONE_ATTRIBUTE, false);
    }
1355965
public function init(MvcEvent $event): void
    {
        if (true === $this->tracyOptions->getEnabled()) {
            Debugger::enable($this->tracyOptions->getMode());

            if (null !== $this->tracyOptions->getEmail()) {
                Debugger::$email = $this->tracyOptions->getEmail();
            }

            if (null !== $this->tracyOptions->getLogDirectory()) {
                Debugger::$logDirectory = $this->tracyOptions->getLogDirectory();
            }

            if (null !== $this->tracyOptions->getLogSeverity()) {
                Debugger::$logSeverity = $this->tracyOptions->getLogSeverity();
            }

            if (null !== $this->tracyOptions->getMaxDepth()) {
                Debugger::$maxDepth = $this->tracyOptions->getMaxDepth();
            }

            if (null !== $this->tracyOptions->getMaxLength()) {
                Debugger::$maxLength = $this->tracyOptions->getMaxLength();
            }

            if (null !== $this->tracyOptions->getShowBar()) {
                Debugger::$showBar = $this->tracyOptions->getShowBar();
            }

            if (null !== $this->tracyOptions->getShowLocation()) {
                Debugger::$showLocation = $this->tracyOptions->getShowLocation();
            }

            if (null !== $this->tracyOptions->getStrict()) {
                Debugger::$strictMode = $this->tracyOptions->getStrict();
            }
        }
    }