/** * Constructor. */ public function __construct(Item $item = null) { if ($item) { $this->editor = $item->getEditor(); $this->item_id = $item->getId(); $this->locale = $item->getLocale(); $this->meta = $item->getMeta(); $this->text = $item->getText(); $this->user = $item->getUser(); } $this->created_at = new \DateTime(); }