@param ParticipantIdentityDto[] $participantIdentities

@return $this
169527
public function setParticipantIdentities($participantIdentities)
    {
        foreach ($participantIdentities as $key => $dtoData) {
            $this->participantIdentities[$key] = new ParticipantIdentityDto($dtoData);
        }
    
        return $this;
    }
303921
public function setUserByIdentity(IdentityInterface $identity)
    {
        $user = clone $this->getUser();
        $user->setIdentity($identity);
        $this->setUser($user);
    }
540079
public ParticipantIdentity getParticipantIdentity(Participant participant) {
		if (participantIdentities != null) {
			for (ParticipantIdentity participantIdentity : participantIdentities) {
				if (participant.getParticipantId() == participantIdentity.getParticipantId()) {
					return participantIdentity;
				}
			}
		}
		
		return null;
	}
1172007
public function setEventManager(EventManagerInterface $events)
    {
        $identifiers = array('Social');
        $events->setIdentifiers($identifiers);
        $this->eventManager = $events;

        return $this;
    }
154178
protected function _authenticateValidateResultSet(array $resultIdentities)
    {
        if (count($resultIdentities) < 1) {
            $this->_authenticateResultInfo['code'] = \Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;
            $this->_authenticateResultInfo['messages'][] = 'A record with the supplied identity could not be found.';
            return $this->_authenticateCreateAuthResult();
        } elseif (count($resultIdentities) > 1) {
            $this->_authenticateResultInfo['code'] = \Zend_Auth_Result::FAILURE_IDENTITY_AMBIGUOUS;
            $this->_authenticateResultInfo['messages'][] = 'More than one record matches the supplied identity.';
            return $this->_authenticateCreateAuthResult();
        }

        return true;
    }
274993
public function removeAce(SecurityIdentityInterface $securityIdentity = null, $objectLanguage = null)
    {
        $aces = null;
        foreach ($this->entries as $index => $entry) {
            if ($entry->getSecurityIdentifier() === $securityIdentity->getIdentifier() && $entry->getSecurityType() === $securityIdentity->getType()) {
                unset($this->entries[$index]);
            }
        }

        return $this;
    }
776782
public function recipients($users = [])
    {
        if (empty($users)) {
            return $this;
        }
        $model = $this->noInitModel;
        return $this->andWhere([$model->otherGuidAttribute => BaseMongoEntityModel::compositeGUIDs($users)]);
    }
84127
public function addOrganizationSecurityIdentities(AddSecurityIdentityEvent $event): void
    {
        try {
            $sids = $event->getSecurityIdentities();
            $sids = IdentityUtils::merge(
                $sids,
                OrganizationSecurityIdentity::fromToken(
                    $event->getToken(),
                    $this->context,
                    $this->roleHierarchy
                )
            );
            $event->setSecurityIdentities($sids);
        } catch (\InvalidArgumentException $e) {
            // ignore
        }
    }
884284
public function addParticipants(array $participants)
    {
        if (count($participants)) {
            foreach ($participants as $user_id) {
                Participant::firstOrCreate([
                    'user_id' => $user_id,
                    'thread_id' => $this->id,
                ]);
            }
        }
    }
715651
public function setPersonType($PersonType)
    {
        switch ($PersonType) {
            case static::NATURAL_PERSON:
            case static::LEGAL_PERSONALITY:
                $this->PersonType = $PersonType;
            break;

            default:
                throw new \InvalidArgumentException(sprintf('Invalid person type: %s', $PersonType));
        }

        return $this;
    }
915903
public function setEventManager(EventManagerInterface $events)
    {
        $identifiers = array(__CLASS__, get_called_class());
        if (isset($this->eventIdentifier)) {
            if ((is_string($this->eventIdentifier))
                || (is_array($this->eventIdentifier))
                || ($this->eventIdentifier instanceof Traversable)
            ) {
                $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
            } elseif (is_object($this->eventIdentifier)) {
                $identifiers[] = $this->eventIdentifier;
            }
            // silently ignore invalid eventIdentifier types
        }
        $events->setIdentifiers($identifiers);
        $this->events = $events;
        return $this;
    }
1158053
protected function normalizeRoleIdentifiers(array $roleIdentifiers)
    {
        foreach ($roleIdentifiers as &$roleIdentifier) {
            $roleIdentifier = $this->normalizeRoleIdentifier($roleIdentifier);
        }

        return $roleIdentifiers;
    }
836404
public function add(DocumentInterface $document)
    {
        $this->documents[(string) $document->getIdentity()] = $document;

        return $this;
    }
839735
private function processDeserializeTypeCollectionIdentifiedObject(
        Type\Collection\IdentifiedObject $objectType,
        $object,
        array $values
    ): self {
        $identifierAttribute = $this->configuration->getIdentifierAttribute();

        $objects = [];
        foreach ($values as $key => $objectFromValue) {
            if (isset($objectFromValue[$identifierAttribute]) === false) {
                continue;
            }

            $configurationObject =
                $this->configuration->getConfigurationObjectForIdentifier($objectFromValue[$identifierAttribute]);

            if ($configurationObject instanceof Blackhole) {
                continue;
            }

            $objects[$key] = $this->setObjectForClass($configurationObject->getClassName(), $objectFromValue);
        }

        $object->{$objectType->setter()}($objects);

        return $this;
    }
149905
public function sendGroupsParticipantsAdd($groupId, $participant)
    {
        $msgId = $this->createMsgId();
        $this->sendGroupsChangeParticipants($groupId, $participant, 'add', $msgId);
    }
535184
public function getContext($callSid) {
        return new ParticipantContext(
            $this->version,
            $this->solution['accountSid'],
            $this->solution['conferenceSid'],
            $callSid
        );
    }
48966
public function addIdentifier($identifier)
    {
        if (!isset($this->identifiers[$identifier])) {
            $this->identifiers[$identifier] = $identifier;
        }

        return $this;
    }