Esempio n. 1
0
 /**
  * 删除工作流
  *
  * @access public
  */
 public function delete(Process $manager)
 {
     $id = array_map('intval', (array) Request::input('id'));
     $info = $manager->workflowInfos(['ids' => $id]);
     if (!$manager->deleteWorkflow(['ids' => $id])) {
         return responseJson($manager->getErrorMessage());
     }
     $this->setActionLog(['workflowInfo' => $info]);
     return responseJson(Lang::get('common.action_success'), true);
 }
Esempio n. 2
0
 /**
  * 删除工作流
  *
  * @access public
  */
 public function delete()
 {
     $id = Request::input('id');
     if (!is_array($id)) {
         if (!$id) {
             return responseJson(Lang::get('common.action_error'));
         }
         $id = array($id);
     }
     $id = array_map('intval', $id);
     $manager = new Process();
     $info = $manager->workflowInfos(['ids' => $id]);
     if ($manager->deleteWorkflow(['ids' => $id])) {
         $this->setActionLog(['workflowInfo' => $info]);
         return responseJson(Lang::get('common.action_success'), true);
     }
     return responseJson($manager->getErrorMessage());
 }