public function executeDelete(sfWebRequest $request) { $request->checkCSRFProtection(); $this->forward404Unless($DeviceType = DeviceTypePeer::retrieveByPk($request->getParameter('id')), sprintf('Object DeviceType does not exist (%s).', $request->getParameter('id'))); $DeviceType->delete(); $this->redirect('devicetype/index'); }
/** * Get the associated DeviceType object * * @param PropelPDO Optional Connection object. * @return DeviceType The associated DeviceType object. * @throws PropelException */ public function getDeviceType(PropelPDO $con = null) { if ($this->aDeviceType === null && ($this->type_id !== "" && $this->type_id !== null)) { $this->aDeviceType = DeviceTypePeer::retrieveByPk($this->type_id); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aDeviceType->addDevices($this); */ } return $this->aDeviceType; }