Apply the organizer created event.
@param OrganizerCreated $organizerCreated
193435
protected function applyOrganizerCreated(OrganizerCreated $organizerCreated)
    {
        $this->actorId = $organizerCreated->getOrganizerId();

        $this->mainLanguage = new Language('nl');

        $this->setTitle($organizerCreated->getTitle(), $this->mainLanguage);
    }
789527
public function applySort()
    {
        parent::applySort();

        if ($this->getSortBy() && $this->itemCreate) {
            //Remove previous click handler to Add new Item button and attach new one using sort argument.
            $this->container->js(true, $this->itemCreate->js()->off('click.atk_CRUD'));
            $this->container->js(true,
                                 $this->itemCreate->js()->on('click.atk_CRUD',
                                 new jsFunction([
                                     new jsModal('Add new', $this->pageCreate, [$this->name.'_sort' => $this->getSortBy()]),
                                 ]))
            );
        }
    }
1052836
def on_created(self, event, dry_run=False, remove_uploaded=True):
        ' '
        super(ArchiveEventHandler, self).on_created(event)
        log.info("created: %s", event)
4322
public function setOrganizer(string $email) : void
    {
        if ('' !== $email) {
            $this->event->setOrganizer(
                new Organizer($email, ['MAILTO' => $email])
            );
        }
    }
984074
public function onCreate(CreateResourceEvent $event)
    {
        $form = $this->formFactory->create(new ActivityType(), new Activity());
        $form->handleRequest($this->request);

        if ($form->isValid()) {
            $published = $form->get('published')->getData();
            $event->setPublished($published);
            $activity = $form->getData();
            $activity->setName($activity->getTitle());
            $activityParameters = new ActivityParameters();
            $activityParameters->setActivity($activity);
            $activity->setParameters($activityParameters);
            $event->setResources(array($activity));
            $event->stopPropagation();

            return;
        }

        $content = $this->templating->render(
            'ClarolineCoreBundle:Resource:createForm.html.twig',
            array(
                'form' => $form->createView(),
                'resourceType' => 'activity'
            )
        );

        $event->setErrorFormContent($content);
        $event->stopPropagation();
    }
820003
public function onWorkspaceToolOpen(DisplayToolEvent $event)
    {
        $workspace = $event->getWorkspace();

        if (!$this->authorization->isGranted(['claroline_planned_notification_tool', 'OPEN'], $workspace)) {
            throw new AccessDeniedException();
        }
        $content = $this->templating->render(
            'ClarolinePlannedNotificationBundle:planned_notification_tool:tool_open.html.twig', [
                'workspace' => $workspace,
                'canEdit' => $this->authorization->isGranted(['claroline_planned_notification_tool', 'EDIT'], $workspace),
            ]
        );
        $event->setContent($content);
        // /    $event->stopPropagation();
    }
99200
public function createOrganization(Organization $org, $createDefaultUsers = true)
	{
        $url = self::makeUrl(null, array('createDefaultUsers' => $createDefaultUsers));
        $data = json_encode($org);
        $this->service->prepAndSend($url, array(201), 'POST', $data, false, 'application/json', 'application/json');
    }
1264450
public function onIndexRebuild(IndexRebuildEvent $event)
    {
        foreach ($this->adapter->listIndexes() as $indexName) {
            if (!$this->indexNameDecorator->isVariant($this->indexNameDecorator->undecorate($indexName), $indexName)) {
                continue;
            }

            $event->getOutput()->writeln(sprintf('<info>Optimizing zend lucene index:</info> %s', $indexName));
            $this->adapter->optimize($indexName);
        }
    }
944759
public function processCreateDraft(FormActionEvent $event)
    {
        /** @var $createContentDraft \EzSystems\RepositoryForms\Data\Content\CreateContentDraftData */
        $createContentDraft = $event->getData();

        $contentInfo = $this->contentService->loadContentInfo($createContentDraft->contentId);
        $versionInfo = $this->contentService->loadVersionInfo($contentInfo, $createContentDraft->fromVersionNo);
        $contentDraft = $this->contentService->createContentDraft($contentInfo, $versionInfo);
        $referrerLocation = $event->getOption('referrerLocation');

        $event->setPayload('content', $contentDraft);
        $event->setPayload('is_new', $contentDraft->contentInfo->isDraft());

        $contentEditUrl = $this->router->generate('ez_content_draft_edit', [
            'contentId' => $contentDraft->id,
            'versionNo' => $contentDraft->getVersionInfo()->versionNo,
            'language' => $contentDraft->contentInfo->mainLanguageCode,
            'locationId' => null !== $referrerLocation ? $referrerLocation->id : null,
        ]);
        $event->setResponse(new RedirectResponse($contentEditUrl));
    }
217337
protected function applyEventDeleted(EventDeleted $event)
    {
        $eventId = $event->getItemId();
        $this->repository->removeRelations($eventId);

    }
1139900
public function onCreate(CreateResourceEvent $event)
    {
        $request = $this->container->get('request');
        $form = $this->container->get('form.factory')->create(new FileType(true), new File());
        $form->handleRequest($request);

        if ($form->isValid()) {
            $this->handleFileCreation($form, $event);
        }

        $content = $this->container->get('templating')->render(
            'ClarolineCoreBundle:Resource:createForm.html.twig',
            array(
                'form' => $form->createView(),
                'resourceType' => $event->getResourceType()
            )
        );
        $event->setErrorFormContent($content);
        $event->stopPropagation();
    }
438752
public function onCreateZone(ZoneEvent $event)
    {
        $zone = $event->getZone();
        if ($zone->getComponents()->isEmpty()) {
            return;
        }

        $this->save($zone);
    }
479125
public function applyEventDeleted(
        EventDeleted $eventDeleted
    ) {
        $this->repository->deleteIndex(
            $eventDeleted->getItemId(),
            EntityType::EVENT()
        );
    }
140333
protected function applyPlaceCreated(
        PlaceCreated $placeCreated,
        DomainMessage $domainMessage
    ) {
        $placeId = $placeCreated->getPlaceId();

        $address = $placeCreated->getAddress();

        $this->addNewItemToIndex(
            $domainMessage,
            $placeId,
            EntityType::PLACE(),
            $placeCreated->getTitle(),
            $address->getPostalCode(),
            $address->getLocality(),
            $address->getCountry()->getCode()
        );
    }
1174221
protected function applyOrganizerProjectedToJSONLD(
        OrganizerProjectedToJSONLD $organizerProjectedToJSONLD
    ) {
        $placeIds = $this->placeRelations->getPlacesOrganizedByOrganizer(
            $organizerProjectedToJSONLD->getId()
        );

        $organizer = $this->organizerService->getEntity(
            $organizerProjectedToJSONLD->getId()
        );

        $organizerJSONLD = json_decode($organizer);

        foreach ($placeIds as $placeId) {
            $this->updateEmbeddedOrganizer($placeId, $organizerJSONLD);
        }
    }
1374626
public void setEventCreatedOn(String eventCreatedOn) {
        Long milliseconds = TimeUnit.SECONDS.toMillis(Long.parseLong(eventCreatedOn));
        this.eventCreatedOn = new Date(milliseconds);
    }
1338612
public function add_new_organization(cc_i_organization &$org) {
        $norg    = $this->activemanifest->create_organization_node($org, $this->doc);
        $orgnode = $this->node("//imscc:manifest[@identifier='".
            $this->activemanifest->manifestID().
            "']/imscc:organizations");
        $orgnode->appendChild($norg);
    }