public function getParentName() { if ($this->getParent() != null && $this->getParent() != 0) { return TransactionStatusPeer::retrieveByPk($this->getParent())->getName(); } return '-'; }
public function executeDelete() { $transaction_status = TransactionStatusPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($transaction_status); $ref_error = 0; foreach ($transaction_status->getRefCountMethods() as $ref) { $method = "count" . $ref['affix']; $count = $transaction_status->{$method}(); if ($count > 0) { ++$ref_error; $this->getRequest()->setError('transaction_status/delete/' . sfInflector::camelize($ref['table']), $count); } } if ($ref_error > 0) { $this->getRequest()->setError('transaction_status/delete', '_ERR_DELETE_ (' . $transaction_status->toString() . ' - id:' . $transaction_status->getId() . ')'); } else { $transaction_status->delete(); } return $this->forward('transaction_status', 'list'); }