Exemplo n.º 1
0
 public function config($name, $default = null)
 {
     if (($config = Config::find()->where(['name' => $name])->one()) !== null) {
         return $config->value;
     }
     return $default;
 }
Exemplo n.º 2
0
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Config::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }