/** * Add child * * @param \Core_Categories_Row|self $row * @throws Zend_Db_Table_Row_Exception * @return self */ public function addChild(Core_Categories_Row $row) { if (empty($this->_cleanData)) { throw new Zend_Db_Table_Row_Exception('Parent category is not created yet'); } if ($row->getParentNodeId() != $this->getNodeId()) { $row->setParentNode($this->getNodeId()); } $this->getChildren()->addRow($row); return $this; }