示例#1
0
 /**
  * Remove Task model
  * @param $id
  * @return int
  */
 public static function removeTask($id)
 {
     return Task::deleteAll('id = :id', [':id' => $id]);
 }
示例#2
0
 /**
  * Deletes an existing Task models.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  *
  * @return int|false number of tasks deleted or false if there was no task provided for deletion
  */
 public function actionDeleteTasks()
 {
     if (isset($_POST['tasks'])) {
         return Task::deleteAll(['in', 'id', $_POST['tasks']]);
     }
     return false;
 }
 public function down()
 {
     Task::deleteAll(['action' => 'submissions/send-new']);
     $this->dropColumn(Submission::tableName(), 'sending_status');
 }