Add BackendController/AccesControl

Add the BackendController for all the backend controllers.
Add AccesControl
This commit is contained in:
2015-11-02 17:27:47 +01:00
parent 1ee0a6bbe9
commit ed1e0b6c2a
17 changed files with 160 additions and 321 deletions

View File

@@ -15,19 +15,8 @@ use backend\models\CustomerUpdate;
/**
* CustomerController implements the CRUD actions for Customer model.
*/
class CustomerController extends Controller
class CustomerController extends \backend\controllers\BackendController
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* Lists all Customer models.
@@ -105,7 +94,6 @@ class CustomerController extends Controller
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
@@ -113,6 +101,7 @@ class CustomerController extends Controller
return $this->redirect(['index']);
}
*/
/**
* Finds the Customer model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.