sathyashrayan

AddController.php

Aug 5th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. namespace Attributes\Controller;
  2. class AddController extends AbstractActionController
  3. {
  4. public function addAction()
  5.     {
  6.         $request = $this->getRequest();
  7.         if ($request->isPost()) {
  8.             $this->_form->setData($request->getPost());
  9.             if ($this->_form->isValid()) {             
  10.                 try{                                       
  11.                     $this->_Eav_attribute_service->save($this->_form->getData());
  12.                    
  13.                 }catch (\Exception $e){
  14.                    
  15.                 }
  16.                
  17.             }
  18.         }
  19.         return array('form' => $this->_form);
  20.     }
  21. }
Add Comment
Please, Sign In to add comment