public function addAction()
 {
     $form = new Form_Iadmin_Roles();
     if ($this->_request->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $role = new Roles();
             $role->setRoleName($form->role_name->getValue());
             $role->setDescription($form->description->getValue());
             $category_id = $this->_em->find('ListDetail', $form->category_id->getValue());
             $role->setCategory($category_id);
             $role->setStatus($form->status->getValue());
             $user_id = $this->_em->find('Users', $this->_userid);
             $role->setCreatedBy($user_id);
             $role->setCreatedDate(App_Tools_Time::now());
             $role->setModifiedBy($user_id);
             $role->setModifiedDate(App_Tools_Time::now());
             $this->_em->persist($role);
             $this->_em->flush();
         }
     }
     $this->_redirect("/iadmin/manage-roles");
 }
 public function setCategory(\ListDetail $category)
 {
     $this->__load();
     return parent::setCategory($category);
 }