Example #1
0
 public function __construct(User $user, DTOBuilderFactoryInterface $dtoBuilderFactory)
 {
     $this->entity = $user;
     $this->dtoBuilderFactory = $dtoBuilderFactory;
     $this->entityDTO = $this->getEntityDTO();
     $this->setId();
     $this->setTime();
     $this->entityDTO->externalId = $this->entity->getExternalId();
     $this->entityDTO->email = $this->entity->getEmail();
     $this->entityDTO->firstName = $this->entity->getFirstName();
     $this->entityDTO->lastName = $this->entity->getLastName();
     $this->entityDTO->totalLogins = $this->entity->getTotalLogins();
     $this->entityDTO->lastLogin = $this->entity->getLastLogin();
     $this->entityDTO->status = $this->dtoBuilderFactory->getUserStatusTypeDTOBuilder($this->entity->getStatus())->build();
 }