A person or organization attending the event. Supersedes attendees.

@param Organization|Person $attendee
@return static
434532
public function setAttendee($attendee)
    {
        ObjectHelper::isInstanceOf($attendee, [Organization::class, PersonInterface::class]);
        
        $this->_attendee = $attendee;
        return $this;
    }
724902
protected function setEventsManager()
    {
        $ev = new EventsManager();
        $ev->enablePriorities(true);
        $ev->collectResponses(true);
        $this->set('eventsManager', $ev, true);
        return $this;
    }
1344973
public function editSuperuser(Person $user, Person $editing)
    {
        return $user->isSuperUser() && !$user->is($editing);
    }
484647
public function listen($event, $callable, $priority = ListenerPriority::NORMAL)
    {
        $this->getDispatcher()->listen($event, $callable, $priority);

        return $this;
    }
700489
public function addVisitor(VisitorInterface $visitor, $priority = 0)
    {
        $this->sortedVisitors = null;

        $this->visitors[spl_object_hash($visitor)] = array(
            'priority' => $priority,
            'visitor' => $visitor
        );

        return $this;
    }
842063
public function observe($event)
	{
		foreach ($this->observers() as $observer => $settings)
		{
			$events = isset($settings['events']) ? $settings['events'] : array();
			if ((empty($events) or in_array($event, $events))
				and empty($this->_disabled_events[$event]))
			{
				if ( ! class_exists($observer))
				{
					$observer_class = \Inflector::get_namespace($observer).'Observer_'.\Inflector::denamespace($observer);
					if ( ! class_exists($observer_class))
					{
						throw new \UnexpectedValueException($observer);
					}

					// Add the observer with the full classname for next usage
					unset(static::$_observers_cached[$observer]);
					static::$_observers_cached[$observer_class] = $events;
					$observer = $observer_class;
				}

				try
				{
					call_user_func(array($observer, 'orm_notify'), $this, $event);
				}
				catch (\Exception $e)
				{
					// Unfreeze before failing
					$this->unfreeze();

					throw $e;
				}
			}
		}
	}
1361756
public function onEventRegistration(Event $event)
    {
        $this->unitOfWork->publishEvent($event, $this->eventBus);

        return $this->unitOfWork->invokeEventRegistrationListeners($event);
    }
135755
public function setOrganization(\WobbleCode\UserBundle\Model\OrganizationInterface $organization)
    {
        $this->organization = $organization;
        return $this;
    }
616470
public function setPayer(\Core\Entity\People $payer = null) {
        $this->payer = $payer;

        return $this;
    }
1095884
public function subscribe(string $eventName, callable $subscriber): self
    {
        if ($subscriber instanceof Closure || ($staticMethod = $this->parseStaticMethod($subscriber)) === null) {
            $this->subscribers[$eventName][] = $subscriber;
        } else {
            assert($staticMethod !== null);
            $this->subscribers[$eventName][] = $this->getUnifiedStaticMethodRepresentation($staticMethod);
        }

        $this->addAllowedEvent($eventName);

        return $this;
    }
734482
public function getParticipant(User $user)
    {
        foreach ($this->getParticipants() as $participant) {
            if ($participant->getUser()->getId() == $user->getId()) {
                return $participant;
            }
        }

        throw new NotFoundHttpException('Participant not found' . $user->getEmail());
    }
239446
public function setContributor($contributor)
    {
        ObjectHelper::isInstanceOf($contributor, [Organization::class, PersonInterface::class]);
        
        $this->_contributor = $contributor;
        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();
    }
950845
public function preCreate(CreateEvent $event)
    {
        $organization = $event->getObject();
        $user = $this->tokenStorage->getToken()->getUser();

        if ($user instanceof User) {
            $organization->addAdministrator($user);
        }
    }
926158
public function createAttendee(EventTicket $ticket) {
		$attendee = new EventAttendee();
		$attendee->TicketID = $ticket->ID;
		$attendee->write();
		$this->Attendees()->add($attendee);
		return $attendee;
	}
347043
public function addEvent(Event $event): self
    {
        $event->setSchedule($this);
        $this->events[] = $event;

        return $this;
    }
1144855
public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $customer = $observer->getEvent()->getCustomer();
        //New Automation enrolment to queue
        $this->automation->newCustomerAutomation($customer);

        return $this;
    }