Example #1
0
 /**
  * Действия
  * @return array
  */
 public function actions()
 {
     $class = Place::className();
     return ['index' => ['class' => crud\Admin::className(), 'modelClass' => $class], 'create' => ['class' => crud\Create::className(), 'modelClass' => $class], 'update' => ['class' => crud\Update::className(), 'modelClass' => $class], 'view' => ['class' => crud\View::className(), 'modelClass' => $class], 'delete' => ['class' => crud\Delete::className(), 'modelClass' => $class], 'groupdelete' => ['class' => crud\GroupDelete::className(), 'modelClass' => $class], 'editable' => ['class' => crud\XEditable::className(), 'modelClass' => $class]];
 }
Example #2
0
<?php

use app\modules\banners\models;
return ['controllerMap' => ['migrate' => ['migrationLookup' => ['@webapp/modules/banners/migrations']]], 'modules' => ['banners' => ['class' => 'app\\modules\\banners\\Banners', 'controllerNamespace' => 'app\\modules\\banners\\controllers', 'components' => ['rendererFactory' => \app\modules\banners\components\RendererFactory::className()], 'modules' => ['admin' => ['class' => 'app\\modules\\banners\\modules\\admin\\Admin', 'controllerNamespace' => 'app\\modules\\banners\\modules\\admin\\controllers', 'menuItems' => function () {
    return [['label' => Yii::t('banners/app', 'Banners module'), 'icon' => 'glyphicon glyphicon-picture', 'items' => [['label' => Yii::t('banners/app', 'Banners'), 'url' => ['/admin/banners/banner'], "permission" => ["listModels", ["model" => Yii::createObject(models\Banner::className())]]], ['label' => Yii::t('banners/app', 'Places'), 'url' => ['/admin/banners/place'], "permission" => ["listModels", ["model" => Yii::createObject(models\Place::className())]]]]]];
}]]]], 'components' => ['i18n' => ['translations' => ['banners/*' => ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@webapp/modules/banners/messages', 'fileMap' => ['banners/app' => 'app.php']]]], 'urlManager' => ['rules' => []]]];
Example #3
0
 /**
  * Связь с баннерами
  * @return \yii\db\ActiveQuery
  */
 public function getPlace()
 {
     return $this->hasOne(Place::className(), ["id" => "place_id"]);
 }