public function bct_getParent() { return Project::getTaskModel($this->taskID); // Task::find()->where(['id'=>$this->taskID,])->one(); }
/** * Deletes an existing Tasks model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionTaskdelete($id) { $task = Project::getTaskModel($id); $projectid = $task->projectID; $task->delete(); return $this->redirect(['tasklist', 'projectid' => $projectid]); }