public function getParentalIndex() { $parentalIndex = "#" . str_pad($this->getId(), 3, '0', STR_PAD_LEFT); $this->level = 1; if ($this->getParent() !== null && $this->getParent() != 0) { $p = CounselingSpecPeer::retrieveByPK($this->getParent()); $parentalIndex = str_pad($p->getParentalIndex(), 3, '0', STR_PAD_LEFT) . "_" . $parentalIndex; $this->level += $p->level; } $this->parentalIndex = $parentalIndex; return $parentalIndex; }
public function getCounselingSpecRelatedByParent($con = null) { include_once 'lib/model/om/BaseCounselingSpecPeer.php'; if ($this->aCounselingSpecRelatedByParent === null && $this->parent !== null) { $this->aCounselingSpecRelatedByParent = CounselingSpecPeer::retrieveByPK($this->parent, $con); } return $this->aCounselingSpecRelatedByParent; }
public function getCounselingSpec($con = null) { include_once 'lib/model/om/BaseCounselingSpecPeer.php'; if ($this->aCounselingSpec === null && $this->counseling_spec_id !== null) { $this->aCounselingSpec = CounselingSpecPeer::retrieveByPK($this->counseling_spec_id, $con); } return $this->aCounselingSpec; }