Пример #1
0
 public function executeAdd(sfWebRequest $request)
 {
     if ($request->isMethod('Post')) {
         $ward = new Ward();
         $ward->setTitle($request->getParameter('title'));
         //$ward->setDescription($request->getParameter('description'));
         $ward->setStatus(Constant::RECORD_STATUS_ACTIVE);
         $ward->save();
         $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_ADDED_SUCCESSFULLY);
         $this->redirect('Ward/list');
     }
     //end if
 }