public function toDocument() { $document = new Document(); $document->setFields(['name' => $this->name, 'keywords' => $this->keywords]); return $document; }