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