backend/controllers/ModuleController.php
/**
     * Deletes an existing Module model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     *
     * @param integer $id
     * @return mixed
     */
Deletes an existing Module model.
If deletion is successful, the browser will be redirected to the 'index' page.

@param integer $id
@return mixed
Deletes an existing Module model . If deletion is successful the browser will be redirected to the ' index ' page . @param integer $id @return mixed
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        $path = Yii::getAlias($this->_dir . $model->directory);
        if ($model->delete()) {
            FileHelper::removeDirectory($path);
        }
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ model = $ this -> findModel ( $ id ) ; $ path = Yii :: getAlias ( $ this -> _dir . $ model -> directory ) ; if ( $ model -> delete ( ) ) { FileHelper :: removeDirectory ( $ path ) ; } return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Module model.
Deletes an existing Module model .
// Delete module and its directory