An organizer of an Event.

@param Organization|Person $organizer
@return static
480965
public function setOrganizer($organizer)
    {
        ObjectHelper::isInstanceOf($organizer, [Organization::class, PersonInterface::class]);
        
        $this->_organizer = $organizer;
        return $this;
    }
1052512
public function addMemberByInvitation(OrganizationInterface $organization, User $user, Invitation $invitation)
    {
        $this->addMember($organization, $user, $invitation->getRoles());

        $invitation->setStatus('accepted');
        $invitation->setTo($user);
        $this->dm->persist($invitation);
        $this->dm->flush();
    }
1344973
public function editSuperuser(Person $user, Person $editing)
    {
        return $user->isSuperUser() && !$user->is($editing);
    }
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');
    }
280805
public function create(Event $event)
    {
        return $this->cache->store($this->store)->add(
            $event->mutexName(), true, $event->expiresAt * 60
        );
    }
684216
public function createDefaultOrganization()
    {
        $organization = new Organization();
        $organization->setName($this->getUsername());

        $this->organizations[] = $organization;
    }
264390
public function dispatchEvent(object $event): object
    {
        if (isset($this->i__dispatcher)) {
            $this->i__dispatcher->dispatch($event);
        }

        return $event;
    }
1048323
protected function applyOrganizerDeleted(AbstractOrganizerDeleted $organizerDeleted)
    {
        $document = $this->loadDocumentFromRepository($organizerDeleted);

        $offerLd = $document->getBody();

        unset($offerLd->organizer);

        return $document->withBody($offerLd);
    }
277648
public function removeOrganization(\WobbleCode\UserBundle\Model\OrganizationInterface $organization)
    {
        $this->organizations->removeElement($organization);
    }
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);
    }
236596
public static function formatNameWithOrg($name, $organization = null)
    {
        if ($organization instanceof OrganizationInterface
                && false === strpos('__', $name)) {
            $name .= '__'.$organization->getName();
        }

        return $name;
    }
88294
public function publish(Event $event)
    {
        foreach ($this->subscribers as $subscriber) {
            if ($subscriber->isSubscribedTo($event)) {
                $subscriber->handle($event);
            }
        }

        return $this;
    }
984915
public function setComposer($composer)
    {
        ObjectHelper::isInstanceOf($author, [Organization::class, PersonInterface::class]);
        
        $this->_composer = $composer;
        return $this;
    }
804921
public static function create(Event $event): EventMessage
    {
        $timestamp = DateTime::now();
        $id = MessageId::generate();
        $metaData = MetaData::create();

        return new static($id, $timestamp, $event, $metaData);
    }
1143374
public function deleteOrganization(Organization $org)
	{
        $url = self::makeUrl($org->id);
		$this->service->prepAndSend($url, array(204), 'DELETE', null, false);
	}
611833
public function setPerformer($performer)
    {
        ObjectHelper::isInstanceOf($performer, [Organization::class, PersonInterface::class]);
        
        $this->_performer = $performer;
        return $this;
    }
1234935
public function iHaveOrganization($name)
    {
        $user = $this->getUserContext()->getCurrentUser();
        $organization = $this->findOrganizationByName($name,false);
        $repo = $this->getRepository('Organizations/Organization');
        if(!$organization instanceof Organization){

            $organization = new Organization();
            $organizationName = new OrganizationName($name);
            $organization->setOrganizationName($organizationName);
            $organization->setIsDraft(false);
        }
        /* @var OrganizationReference $orgReference */
        $orgReference = $user->getOrganization();
        $parent = $orgReference->getOrganization();
        $organization->setParent($parent);
        $organization->setProfileSetting(Organization::PROFILE_ALWAYS_ENABLE);
        $permissions = $organization->getPermissions();
        $permissions->grant($user,Permissions::PERMISSION_ALL);

        $repo->store($organization);
        $repo->getDocumentManager()->refresh($organization);
        $repo->getDocumentManager()->refresh($user);
    }