Example #1
0
 /**
  * @Secured(resource="updateTax")
  */
 public function actionUpdateTax($id)
 {
     if (!is_numeric($id)) {
         $this->handleBadArgument($id);
     }
     try {
         $db = $this->taxService->getTax($id);
         if ($db !== null) {
             $form = $this->getComponent("updateTaxForm");
             $form->setDefaults($db->toArray());
         }
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataLoad($id, "default", $ex);
     }
 }