employee = $employee; $this->start = new \DateTime('now'); $this->address = new Address(); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'employee' => \is_int($this->employee) ? $this->employee : $this->employee->id, 'jobTitle' => $this->jobTitle, 'start' => $this->start, 'end' => $this->end, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } use \Modules\Media\Models\MediaListTrait; }