public function actionIndex()
 {
     $model_content = new Content();
     $this->headerPage = "Список страниц";
     $data['items'] = $this->GetModel()->MakePage($model_content->GetDataTree(0, ['isdirectory' => 1]));
     return $this->render('index', $data);
 }
Ejemplo n.º 2
0
 /**
  * Выбор страниц
  * @param array $rowParams
  * @param string $value
  * @param array $item
  */
 public function SelectPages($rowParams = [], $value = "", $item = [])
 {
     $params = $this->MakeRowParams($rowParams["params"]);
     $model = new \app\modelsActiveRecords\Content();
     $rowName = $this->ReturnGroup($rowParams);
     $data = app::I()->MakeTreeArray($model->find()->where(['isDirectory' => 1])->asArray()->all());
     $tree = $this->TreeFields($data, 'tree', []);
     $tag = Html::label($rowParams["label"], $rowParams["name"]);
     $tag .= $tree;
     $tag .= Html::textInput($rowName, '', ['type' => 'hidden', 'id' => 'change-pages']);
     return $tag;
 }