name = $commandTask->getName(); $this->clients = $commandTask->getClients()->map( fn(Client $client) => new ClientOutput($client) )->toArray(); $this->organizationalUnit = new OrganizationalUnitOutput($commandTask->getOrganizationalUnit()); $this->notes = $commandTask->getNotes(); $this->scope = $commandTask->getScope(); $this->lastExecution = $commandTask->getLastExecution(); $this->nextExecution = $commandTask->getNextExecution(); $this->createdAt = $commandTask->getCreatedAt(); $this->createdBy = $commandTask->getCreatedBy(); } }