public function setParentId($parentId) { $this->parentId = (int) $parentId; $this->parent = null; return $this; }