本文整理汇总了PHP中vova07\imperavi\Widget::className方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::className方法的具体用法?PHP Widget::className怎么用?PHP Widget::className使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vova07\imperavi\Widget
的用法示例。
在下文中一共展示了Widget::className方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'annonce')->widget(Imperavi::className(), ['id' => 'imperavi-widget-annonce', 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'maxHeight' => 400, 'limiter' => 4, 'imageManagerJson' => Url::to(['admin/images-get']), 'imageUpload' => Url::to(['admin/image-upload']), 'imageDelete' => ['url' => Url::to(['admin/image-delete'])], 'plugins' => $imperaviPlugins]]);
?>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'content')->widget(Imperavi::className(), ['id' => 'imperavi-widget-content', 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'maxHeight' => 400, 'imageManagerJson' => Url::to(['admin/images-get']), 'imageUpload' => Url::to(['admin/image-upload']), 'imageDelete' => Url::to(['admin/image-delete']), 'plugins' => $imperaviPlugins]]);
?>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'status')->dropDownList($model->getStatusArray());
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? Module::t('eugenekei-news', 'Create') : Module::t('eugenekei-news', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-primary btn-large' : 'btn btn-success btn-large']);
示例2:
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="comment-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => \yii\helpers\Url::to(['/site/image-upload']), 'buttons' => ['html', 'bold', 'italic', 'underline', 'deleted']]]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Изменить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例3:
<?php
/**
* @var $attribute_name string
* @var $form \yii\widgets\ActiveForm
* @var $label string
* @var $model \app\properties\AbstractModel
* @var $multiple boolean
* @var $property_id integer
* @var $property_key string
* @var $this \app\properties\handlers\Handler
* @var $values array
*/
use vova07\imperavi\Widget as ImperaviWidget;
use yii\helpers\Url;
echo $form->field($model, $property_key . '[0]')->widget(ImperaviWidget::className(), ['settings' => ['replaceDivs' => false, 'minHeight' => 200, 'paragraphize' => true, 'pastePlainText' => true, 'buttonSource' => true, 'imageManagerJson' => Url::to(['/backend/dashboard/imperavi-images-get']), 'plugins' => ['table', 'fontsize', 'fontfamily', 'fontcolor', 'video', 'imagemanager'], 'replaceStyles' => [], 'replaceTags' => [], 'deniedTags' => [], 'removeEmpty' => [], 'imageUpload' => Url::to(['/backend/dashboard/imperavi-image-upload'])]]);
示例4:
<?php
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
* @var yii\web\View $this
* @var common\models\SliderImage $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="slider-image-form">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>
</div>
示例5: isset
case Content::ATTR_TYPE_TITLE:
echo $form->field($model, $attr)->textInput(isset($value['config']) ? $value['config'] : []);
$titleAttribute = $attr;
break;
case Content::ATTR_TYPE_STRING:
echo $form->field($model, $attr)->textInput(isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_INTEGER:
echo $form->field($model, $attr)->input('number', isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_URL:
echo $form->field($model, $attr, ['template' => '{label}<div class="input-group"><span class="input-group-addon attached-button-chain"><i class="icon fa fa-chain"></i></span>{input}</div> {hint}{error}'])->textInput(isset($value['config']) ? $value['config'] : []);
$urlAttribute = $attr;
break;
case Content::ATTR_TYPE_ADVANCED_TEXT:
echo $form->field($model, $attr, ['options' => ['class' => 'form-group col-sm-12']])->widget(Widget::className(), isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_IMAGE:
echo $form->field($model, $attr)->widget(FileAPI::className(), isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_TEXT:
echo $form->field($model, $attr)->textarea(isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_DATE:
echo $form->field($model, $attr)->widget(DateTimePicker::classname(), isset($value['config']) ? $value['config'] : []);
break;
case Content::ATTR_TYPE_BOOLEAN:
echo $form->field($model, $attr)->checkbox();
break;
case Content::ATTR_TYPE_DROPDOWN:
echo $form->field($model, $attr)->dropDownList(isset($value['items']) ? $value['items'] : [], isset($value['config']) ? $value['config'] : []);
示例6:
<div class="blog-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'short_text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>
<?php
echo $form->field($model, 'text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>
<?php
echo $form->field($model, 'status')->dropDownList(Blog::statusNames());
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
示例7: createWidget
/**
* Create ActiveForm widget.
*
* @param \yii\widgets\ActiveForm $form
* @param \yii\db\ActiveRecord $model Model
* @param string $attribute Model attribute
*/
public function createWidget($form, $model, $attribute)
{
$widget = $this->getAttributeWidget($model, $attribute);
$tableSchema = $model->getTableSchema();
switch ($widget) {
case 'widget':
echo $this->createField($form, $model, $attribute, [], 'widget');
break;
case 'wysiwyg':
$options = ['widgetClass' => RedactorWidget::className(), 'settings' => ['minHeight' => 200, 'plugins' => ['video', 'fullscreen']]];
if ($this->redactorImageUpload === true) {
$imageOptions = ['settings' => ['imageManagerJson' => Url::to(['model/redactor-list', 'name' => $this->getModelName($model), 'attr' => $attribute]), 'imageUpload' => Url::to(['model/redactor-upload', 'name' => $this->getModelName($model), 'attr' => $attribute]), 'imageUploadErrorCallback' => new JsExpression('function(json) { alert(json.error); }'), 'plugins' => ['imagemanager']]];
$options = ArrayHelper::merge($options, $imageOptions);
}
if ($this->redactorFileUpload === true) {
$fileOptions = ['settings' => ['fileManagerJson' => Url::to(['model/redactor-list', 'name' => $this->getModelName($model), 'attr' => $attribute, 'type' => 'file']), 'fileUpload' => Url::to(['model/redactor-upload', 'name' => $this->getModelName($model), 'attr' => $attribute, 'type' => 'file']), 'fileUploadErrorCallback' => new JsExpression('function(json) { alert(json.error); }'), 'plugins' => ['filemanager']]];
$options = ArrayHelper::merge($options, $fileOptions);
}
echo $this->createField($form, $model, $attribute, $options, 'widget');
break;
case 'date':
$options = ['widgetClass' => TimePicker::className(), 'mode' => 'date', 'clientOptions' => ['dateFormat' => 'yy-mm-dd']];
echo $this->createField($form, $model, $attribute, $options, 'widget');
break;
case 'time':
$options = ['widgetClass' => TimePicker::className(), 'mode' => 'time', 'clientOptions' => ['timeFormat' => 'HH:mm:ss', 'showSecond' => true]];
echo $this->createField($form, $model, $attribute, $options, 'widget');
break;
case 'datetime':
$options = ['widgetClass' => TimePicker::className(), 'mode' => 'datetime', 'clientOptions' => ['dateFormat' => 'yy-mm-dd', 'timeFormat' => 'HH:mm:ss', 'showSecond' => true]];
echo $this->createField($form, $model, $attribute, $options, 'widget');
break;
case 'select':
$options = ['options' => ['placeholder' => Yii::t('ycm', 'Choose {name}', ['name' => $model->getAttributeLabel($attribute)])], 'settings' => ['allowClear' => true, 'width' => '100%'], 'items' => ['' => '']];
echo $this->createField($form, $model, $attribute, $options, 'select');
break;
case 'selectMultiple':
$options = ['options' => ['multiple' => true, 'placeholder' => Yii::t('ycm', 'Choose {name}', ['name' => $model->getAttributeLabel($attribute)])], 'settings' => ['width' => '100%']];
echo $this->createField($form, $model, $attribute, $options, 'select');
break;
case 'image':
$options = [];
if (!$model->isNewRecord && !empty($model->{$attribute})) {
$className = StringHelper::basename($model->className());
$inputName = $className . '[' . $attribute . '_delete]';
$inputId = strtolower($className . '-' . $attribute . '_delete');
$url = $this->getAttributeUrl($this->getModelName($model), $attribute, $model->{$attribute});
ob_start();
echo '<div class="checkbox"><label for="' . $inputId . '">
<input type="checkbox" name="' . $inputName . '" id="' . $inputId . '" value="delete"> ' . Yii::t('ycm', 'Delete image') . '
</label></div>';
Modal::begin(['size' => Modal::SIZE_LARGE, 'header' => '<h4>' . Yii::t('ycm', 'Preview image') . '</h4>', 'toggleButton' => ['label' => Yii::t('ycm', 'Preview image'), 'class' => 'btn btn-info btn-sm']]);
echo Html::img($url, ['class' => 'modal-image']);
Modal::end();
$html = ob_get_clean();
$options['hint'] = $html;
}
echo $this->createField($form, $model, $attribute, $options, 'fileInput');
break;
case 'file':
$options = [];
if (!$model->isNewRecord && !empty($model->{$attribute})) {
$className = StringHelper::basename($model->className());
$inputName = $className . '[' . $attribute . '_delete]';
$inputId = strtolower($className . '-' . $attribute . '_delete');
$url = $this->getAttributeUrl($this->getModelName($model), $attribute, $model->{$attribute});
$html = '<div class="checkbox"><label for="' . $inputId . '">
<input type="checkbox" name="' . $inputName . '" id="' . $inputId . '" value="delete"> ' . Yii::t('ycm', 'Delete file') . '
</label></div>';
$html .= Html::a(Yii::t('ycm', 'Download file'), $url, ['class' => 'btn btn-info btn-sm']);
$options['hint'] = $html;
}
echo $this->createField($form, $model, $attribute, $options, 'fileInput');
break;
case 'text':
$options = ['maxlength' => $tableSchema->columns[$attribute]->size];
echo $this->createField($form, $model, $attribute, $options, 'textInput');
break;
case 'hidden':
$options = ['maxlength' => $tableSchema->columns[$attribute]->size];
$options = $this->getAttributeOptions($attribute, $options);
echo Html::activeHiddenInput($model, $attribute, $options);
break;
case 'password':
$options = ['maxlength' => $tableSchema->columns[$attribute]->size];
echo $this->createField($form, $model, $attribute, $options, 'passwordInput');
break;
case 'textarea':
$options = ['rows' => 6];
echo $this->createField($form, $model, $attribute, $options, 'textarea');
break;
case 'radio':
echo $this->createField($form, $model, $attribute, [], 'radio');
//.........这里部分代码省略.........
示例8:
echo $title;
?>
</div>
</div>
<div class="box-content">
<?php
$form = ActiveForm::begin(['options' => ['class' => 'default-form', 'autocomplete' => 'off', 'enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'imageUpload' => \yii\helpers\Url::to(['/site/image-upload']), 'buttons' => ['formatting', 'bold', 'italic', 'underline', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'link'], 'plugins' => ['quote', 'skip', 'table', 'video', 'fullscreen']]]);
?>
<?php
// echo $form->field($model, 'source_title')->widget(Typeahead::classname(), [
// 'options' => ['placeholder' => 'Поиск источника при вводе ...'],
// 'pluginOptions' => [
// 'highlight' => true,
// 'imageUpload' => '/upload.php',
// ],
// 'dataset' => [
// [
// 'remote' => \yii\helpers\Url::to(['source/source-name-list']) . '?q=%QUERY',
// 'limit' => 10,
// ]
// ]
示例9:
<div class="news-form">
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'title_new')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'content_new')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen', 'imagemanager'], 'imageManagerJson' => Url::to(['/news/images-get']), 'imageUpload' => Url::to(['/news/image-upload'])]]);
?>
<?php
echo $form->field($model, 'preview_new')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 200, 'plugins' => ['clips', 'fullscreen', 'imagemanager'], 'imageManagerJson' => Url::to(['/news/images-get']), 'imageUpload' => Url::to(['/news/image-upload'])]]);
?>
<?php
echo $form->field($model, 'data_new')->textInput();
?>
<?php
echo $form->field($model, 'file')->fileInput();
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
示例10:
?>
<?php
echo $form->field($model, 'book_category_id')->dropDownList(Books::getCategorys());
?>
<?php
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'authors')->listBox(Books::getAuthors(), ['class' => 'multi-select2', 'multiple' => true]);
?>
<?php
echo $form->field($model, 'annotation')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 120, 'plugins' => ['clips', 'fullscreen']]]);
?>
<?php
echo $form->field($model, 'year')->textInput(['maxlength' => true, 'class' => 'mask_year form-control']);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
<a href="/books" class="btn">Отмена</a>
</div>
<?php
ActiveForm::end();
示例11:
</div>
</div>
<div class="box-content">
<div class="row">
<div class="news-form">
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'header')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'minHeight' => 400, 'pastePlainText' => true, 'buttonSource' => true, 'focus' => true, 'imageUpload' => '/news/upload', 'imageManagerJson' => '/news/uploaded', 'plugins' => ['clips', 'fullscreen', 'imagemanager']]]);
?>
<?php
if ($model->image) {
echo Html::img('/upload/upload_news/' . $model->image, ['style' => 'height: 120px;']);
?>
<a href="<?php
echo Url::to(['/upload/news/deleteimage', 'id' => $model->id]);
?>
" class="btn btn-warning"
onclick="confirmDelete(event)">Удалить</a>
<?php
} else {
echo Html::img('/upload/default.jpg', ['style' => 'height: 120px;']);
示例12:
<?php
use im\cms\Module;
use vova07\imperavi\Widget as Imperavi;
/* @var $this yii\web\View */
/* @var $model im\cms\models\Page */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
echo !isset($attributes) || in_array('title', $attributes) ? $form->field($model, 'title')->textInput(['maxlength' => 100]) : '';
?>
<?php
echo !isset($attributes) || in_array('slug', $attributes) ? $form->field($model, 'slug')->textInput(['maxlength' => 100]) : '';
?>
<?php
echo !isset($attributes) || in_array('content', $attributes) ? $form->field($model, 'content')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300]]) : '';
?>
<?php
echo !isset($attributes) || in_array('status', $attributes) ? $form->field($model, 'status')->dropDownList($model::getStatusesList(), ['prompt' => Module::t('page', 'Select status')]) : '';
示例13:
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'faculty_id');
?>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'image_id')->widget(FileAPI::className(), ['settings' => ['url' => ['/univer/default/fileapi-upload']]]);
?>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<?php
echo $form->field($model, 'description')->widget(Imperavi::className(), ['settings' => ['minHeight' => 200, 'imageGetJson' => Url::to(['/univer/default/imperavi-get']), 'imageUpload' => Url::to(['/univer/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/univer/default/imperavi-file-upload'])]]);
?>
</div>
</div>
<?php
$box->endBody();
$box->beginFooter();
echo Html::submitButton($model->isNewRecord ? Module::t('univer', 'BACKEND_CREATE_SUBMIT') : Module::t('univer', 'BACKEND_UPDATE_SUBMIT'), ['class' => $model->isNewRecord ? 'btn btn-primary btn-large' : 'btn btn-success btn-large']);
$box->endFooter();
ActiveForm::end();
示例14:
<?php
/** @var \yii\web\View $this */
/** @var integer $language_id */
/** @var \DevGroup\Multilingual\models\Language $language */
/** @var \app\models\PageTranslation $model */
/** @var string $attributePrefix */
/** @var \yii\widgets\ActiveForm $form */
use yii\helpers\Url;
echo $form->field($model, $attributePrefix . 'title');
echo $form->field($model, $attributePrefix . 'is_published')->widget(kartik\widgets\SwitchInput::className());
echo $form->field($model, $attributePrefix . 'content')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['minHeight' => 200, 'plugins' => ['table', 'fontsize', 'fontfamily', 'fontcolor', 'video', 'imagemanager', 'clips', 'fullscreen', 'filemanager'], 'pastePlainText' => true, 'buttonSource' => true, 'replaceStyles' => [], 'replaceTags' => [], 'deniedTags' => [], 'removeEmpty' => [], 'imageUpload' => Url::to(['/admin/image-upload']), 'imageManagerJson' => Url::to(['/admin/images-get']), 'fileUpload' => Url::to(['/admin/file-upload']), 'fileManagerJson' => Url::to(['/admin/files-get'])]]);
?>
<!-- ok -->
示例15:
?>
" />
<?php
}
?>
<?php
echo $form->field($model, 'product_type')->dropDownlist(Product::getTypeArray());
?>
<?php
echo $form->field($model, 'product_name')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'product_summary')->textarea(['rows' => 6]);
?>
<?php
echo $form->field($model, 'product_description')->widget(Widget::className(), ['settings' => ['lang' => 'ru', 'replaceDivs' => false, 'minHeight' => 400, 'imageUpload' => Url::to(['/product/default/image-upload']), 'fileUpload' => Url::to(['/product/default/file-upload'])]]);
?>
</div>
<div class="col-md-4">
<?php
echo $form->field($model, 'meta_title')->textInput();
?>
<?php
echo $form->field($model, 'meta_description')->textarea(['rows' => 4]);
?>
<?php
echo $form->field($model, 'alias')->textInput(['maxlength' => true]);
?>
</div>
</div>