createdBy = new NullAccount(); $this->createdAt = new \DateTimeImmutable('now'); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'app' => $this->app, 'name' => $this->name, 'status' => $this->status, 'doc' => $this->doc, 'docRaw' => $this->docRaw, 'language' => $this->language, 'tags' => $this->tags, 'media' => $this->files, 'createdAt' => $this->createdAt, 'createdBy' => $this->createdBy, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } use \Modules\Media\Models\MediaListTrait; }