Пример #1
0
 public function init()
 {
     parent::init();
     $moduleName = FeedbackModule::getModuleName(FeedbackModule::className());
     $this->new = Yii::$app->getModule('admin')->activeModules[$moduleName]->notice;
     $this->noAnswer = Feedback::find()->status(Feedback::STATUS_VIEW)->count();
 }
Пример #2
0
 public function init()
 {
     parent::init();
     $this->pending = Order::find()->status(Order::STATUS_PENDING)->count();
     $this->processed = Order::find()->status(Order::STATUS_PROCESSED)->count();
     $this->sent = Order::find()->status(Order::STATUS_SENT)->count();
 }
Пример #3
0
 public function init()
 {
     parent::init();
     $this->new = Yii::$app->getModule('admin')->activeModules['feedback']->notice;
     $this->noAnswer = Feedback::find()->status(Feedback::STATUS_VIEW)->count();
 }
Пример #4
0
 public function init()
 {
     parent::init();
 }
Пример #5
0
 /**
  * @inheritDoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [['class' => ModelLoaderController::class, 'rules' => [['actions' => ['index', 'generate'], 'ownerAttribute' => 'category', 'modelClass' => Category::class], ['actions' => ['update'], 'ownerAttribute' => 'staticUrl', 'modelClass' => AdminModule::getInstance()->getCatalog()->staticUrlClass]]]]);
 }
Пример #6
0
 /**
  * @inheritDoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [['class' => ModelLoaderController::class, 'rules' => [['actions' => ['update', 'delete'], 'modelClass' => CategoryFieldGroup::class, 'ownerAttribute' => 'fieldGroup']]]]);
 }
Пример #7
0
 /**
  * @inheritDoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['modelLoader' => ['class' => ModelLoaderController::class, 'rules' => [['actions' => ['category'], 'modelClass' => AdminModule::getInstance()->getCatalog()->categoryClass, 'ownerAttribute' => 'category'], ['actions' => ['attribute', 'add'], 'modelClass' => AttributeRuleRecord::class, 'ownerAttribute' => 'rule'], ['actions' => ['sort', 'update', 'delete'], 'modelClass' => AttributeEnumRecord::class, 'ownerAttribute' => 'enum']]]]);
 }
Пример #8
0
 public function init()
 {
     parent::init();
     $this->new = Yii::$app->getModule('admin')->activeModules['guestbook']->notice;
     $this->noAnswer = Guestbook::find()->where(['answer' => ''])->count();
 }