public function setRootId($rootId) { $this->rootId = (int) $rootId; $rd = Document::getById($this->rootId); $this->setRootDocument($rd); return $this; }