/** * @return static */ public function withRoles() { foreach ($this->entity->getUserRoles() as $role) { $this->entityDTO->userRoles[] = $this->dtoBuilderFactory->getUserRoleDTOBuilder($role)->build(); } return $this; }