Ejemplo n.º 1
0
 public function getParentalIndex()
 {
     $parentalIndex = "#" . str_pad($this->getId(), 3, '0', STR_PAD_LEFT);
     $this->level = 1;
     if ($this->getParent() !== null && $this->getParent() != 0) {
         $p = JobTemplatePeer::retrieveByPK($this->getParent());
         $parentalIndex = str_pad($p->getParentalIndex(), 3, '0', STR_PAD_LEFT) . "_" . $parentalIndex;
         $this->level += $p->level;
     }
     $this->parentalIndex = $parentalIndex;
     return $parentalIndex;
 }
Ejemplo n.º 2
0
 public function getJobTemplate($con = null)
 {
     include_once 'lib/model/om/BaseJobTemplatePeer.php';
     if ($this->aJobTemplate === null && $this->job_template_id !== null) {
         $this->aJobTemplate = JobTemplatePeer::retrieveByPK($this->job_template_id, $con);
     }
     return $this->aJobTemplate;
 }