getFullName() public method

Returns the full name of the user.
public getFullName ( ) : string
return string
Ejemplo n.º 1
0
 /**
  * Updates the collaborator with the given connection and user to the entity with the specified identifier.
  *
  * @param ConnectionInterface $conn The connection of the user
  * @param string $type The type of the entity
  * @param mixed $id The id of the entity
  * @param string $connectionId The id of the connection of the user
  * @param UserInterface $user The user being added as collaborator
  */
 private function updateCollaboration(ConnectionInterface $conn, $type, $id, $connectionId, UserInterface $user)
 {
     $entityCollaborationUpdated = false;
     $connectionCollaborationUpdated = false;
     $identifier = $this->getUniqueCollaborationKey($type, $id);
     $userId = $user->getId();
     /** @var Collaboration[] $entityCollaborations */
     $entityCollaborations = $this->collaborationsEntityCache->fetch($identifier) ?: [];
     /** @var Collaboration[] $connectionCollaborations */
     $connectionCollaborations = $this->collaborationsConnectionCache->fetch($connectionId) ?: [];
     if (!array_key_exists($connectionId, $this->connections)) {
         $this->connections[$connectionId] = $conn;
     }
     if (array_key_exists($identifier, $entityCollaborations)) {
         $entityCollaborations[$identifier]->setChanged(time());
         $entityCollaborationUpdated = true;
     }
     if (array_key_exists($connectionId, $connectionCollaborations)) {
         $connectionCollaborations[$connectionId]->setChanged(time());
         $connectionCollaborationUpdated = true;
     }
     $collaboration = new Collaboration($connectionId, $userId, $user->getUsername(), $user->getFullName(), $type, $id);
     if (!$entityCollaborationUpdated) {
         $entityCollaborations[$connectionId] = $collaboration;
     }
     if (!$connectionCollaborationUpdated) {
         $connectionCollaborations[$identifier] = $collaboration;
     }
     $this->collaborationsEntityCache->save($identifier, $entityCollaborations);
     $this->collaborationsConnectionCache->save($connectionId, $connectionCollaborations);
 }