deleteWorklistDefinitionInstances() public method

public deleteWorklistDefinitionInstances ( WorklistDefinition $definition ) : boolean
$definition WorklistDefinition
return boolean
Exemplo n.º 1
0
 /**
  * Delete the generated worklists for a worklist definition.
  *
  * @param $id
  *
  * @throws CHttpException
  */
 public function actionDefinitionWorklistsDelete($id)
 {
     $definition = $this->getWorklistDefinition($id);
     if (isset($_POST['confirm_delete']) && $_POST['confirm_delete'] == $id) {
         if ($this->manager->deleteWorklistDefinitionInstances($definition)) {
             $this->flashMessage('success', "Instances removed for Worklist Definition {$definition->name}");
         } else {
             $this->flashMessage('error', "Unable to delete instances for Worklist Definition {$definition->name}");
         }
         $this->redirect('/worklistAdmin/definitions');
     }
     $this->render('//admin/worklists/definition_worklists_delete', array('definition' => $definition));
 }