コード例 #1
0
ファイル: Row.php プロジェクト: shahmaulik/zfcore
 /**
  * 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;
 }