/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $this->setItems($items); }
/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $items[] = new InputField(['model' => $model, 'attribute' => 'title', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('title')]]); $this->setItems($items); }
/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $items[] = new InputField(['model' => $model, 'attribute' => 'description', 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm', 'data-ckeditor-language' => $language]]); $this->setItems($items); }
/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $items[] = new InputField(['model' => $model, 'attribute' => 'title', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('title')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'content', 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm wysiwyg-textarea', 'data-ckeditor-filebrowser-browse-url' => Url::to(['cms-image/list', 'mode' => 'explorer']), 'data-ckeditor-language' => $language]]); $this->setItems($items); }
/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $items[] = new InputField(['model' => $model, 'attribute' => 'label', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('label')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'description', 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm wysiwyg-textarea', 'data-ckeditor-language' => $language]]); $items[] = new InputField(['model' => $model, 'attribute' => 'url', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('url')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'meta_title', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('meta_title')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'meta_description', 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm', 'placeholder' => $model->getAttributeLabel('meta_description')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'meta_keywords', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('meta_keywords')]]); $items[] = new InputField(['model' => $model, 'attribute' => 'h1_tag', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('h1_tag')]]); $this->setItems($items); }
/** * @inheritdoc */ public function init() { parent::init(); // model $model = $this->getModel(); // language $language = $this->getLanguage(); // set items $items = []; $items['title'] = new InputField(['model' => $model, 'attribute' => 'title', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('title')]]); $items['slug'] = new InputField(['model' => $model, 'attribute' => 'slug', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm active-slug', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('slug')]]); $items['html_title'] = new InputField(['model' => $model, 'attribute' => 'html_title', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'maxlength' => true, 'placeholder' => $model->getAttributeLabel('html_title')]]); $items['html_description'] = new InputField(['model' => $model, 'attribute' => 'html_description', 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm', 'placeholder' => $model->getAttributeLabel('html_description')]]); $items['html_keywords'] = new InputField(['model' => $model, 'attribute' => 'html_keywords', 'type' => 'activeTextInput', 'options' => ['class' => 'form-control input-sm', 'placeholder' => $model->getAttributeLabel('html_keywords')]]); for ($i = 1; $i <= $this->pageContentNumber; ++$i) { $items['content_' . $i] = new InputField(['model' => $this->pageContentModel, 'attribute' => 'content', 'label' => Yii::t('kalibao.backend', 'cms_page_container_index') . ' ' . $i, 'type' => 'activeTextarea', 'options' => ['class' => 'form-control input-sm wysiwyg-textarea', 'data-ckeditor-filebrowser-browse-url' => Url::to(['cms-image/list', 'mode' => 'explorer']), 'data-ckeditor-language' => $this->language, 'data-index' => $i, 'maxlength' => true]]); } $this->setItems($items); }