add indexes, add messagedetsta

This commit is contained in:
2016-01-29 17:13:33 +01:00
parent ad59cbb940
commit a00331ce7c
65 changed files with 3195 additions and 92 deletions

View File

@@ -8,6 +8,8 @@ use backend\models\KeySearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use common\models\Customer;
use backend\models\KeyCustomerSearch;
/**
* KeyController implements the CRUD actions for Key model.
@@ -41,6 +43,28 @@ class KeyController extends Controller
'dataProvider' => $dataProvider, //csomagoló osztály a queryhez
]);
}
/**
* Lists all Key models.
* @return mixed
*/
public function actionIndexCustomer($id)
{
$model = Customer::findOne($id);
if ( !isset($model)){
throw new NotFoundHttpException('The requested page does not exist.');
}
$searchModel = new KeyCustomerSearch(['customer' => $model]);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
// backend/views/kex/index.php
return $this->render('index-customer', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider, //csomagoló osztály a queryhez
]);
}
/**
* Displays a single Key model.