/** * @see Object\ClassDefinition\Data::getDataFromResource * @param integer $data * @return Country */ public function getDataFromResource($data) { if (intval($data) > 0) { return PriceRule::getById($data); } return null; }
public function deleteAction() { $id = $this->getParam("id"); $priceRule = PriceRule::getById($id); if ($priceRule instanceof PriceRule) { $priceRule->delete(); $this->_helper->json(array("success" => true)); } $this->_helper->json(array("success" => false)); }