Пример #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 = TransactionStatusPeer::retrieveByPK($this->getParent());
         $parentalIndex = str_pad($p->getParentalIndex(), 3, '0', STR_PAD_LEFT) . "_" . $parentalIndex;
         $this->level += $p->level;
     }
     $this->parentalIndex = $parentalIndex;
     return $parentalIndex;
 }
Пример #2
0
 public function getTransactionStatus($con = null)
 {
     include_once 'lib/model/om/BaseTransactionStatusPeer.php';
     if ($this->aTransactionStatus === null && $this->transaction_status_id !== null) {
         $this->aTransactionStatus = TransactionStatusPeer::retrieveByPK($this->transaction_status_id, $con);
     }
     return $this->aTransactionStatus;
 }
Пример #3
0
 public function getTransactionStatusRelatedByParent($con = null)
 {
     include_once 'lib/model/om/BaseTransactionStatusPeer.php';
     if ($this->aTransactionStatusRelatedByParent === null && $this->parent !== null) {
         $this->aTransactionStatusRelatedByParent = TransactionStatusPeer::retrieveByPK($this->parent, $con);
     }
     return $this->aTransactionStatusRelatedByParent;
 }