本文整理汇总了PHP中vova07\imperavi\Widget::classname方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::classname方法的具体用法?PHP Widget::classname怎么用?PHP Widget::classname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vova07\imperavi\Widget
的用法示例。
在下文中一共展示了Widget::classname方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
$form = ActiveForm::begin(['layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'app_name')->textInput();
?>
<?php
echo $form->field($model, 'app_logo')->fileInput();
if ($model->app_logo) {
echo "<div class='form-group'><div class='col-sm-offset-3 col-sm-9'>";
echo Html::img('/uploads/settings/app_logo/' . $model->app_logo, ['class' => 'img-thumbnail', 'width' => 150]);
echo "</div></div>";
}
?>
<?php
echo $form->field($model, 'app_description')->widget(Widget::classname(), ['settings' => ['lang' => 'ru', 'minHeight' => 300, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => ['clips', 'fullscreen']]]);
?>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<?php
echo Html::submitButton(\Yii::t('app', 'Save'), ['class' => 'btn btn-primary']);
?>
</div>
</div>
<?php
ActiveForm::end();
?>
</div>
示例2:
<?php
echo $form->field($model, 'source_title')->widget(\yii\jui\AutoComplete::className(), ['clientOptions' => ['source' => $data, 'minLength' => '3', 'autoFill' => true], 'options' => ['class' => 'form-control']]);
?>
<?php
if (!$redactor) {
?>
<?php
echo $form->field($model, 'body')->textarea(['rows' => 5, 'cols' => 5, 'id' => 'my-textarea-id']);
?>
<?php
} else {
?>
<?php
echo $form->field($model, 'body')->widget(Widget::classname(), ['settings' => ['lang' => 'ru', 'minHeight' => 300, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => ['clips', 'fullscreen'], 'imageUpload' => Url::to(['/articles/image-upload'])]]);
?>
<?php
}
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => 'btn btn-primary', 'name' => 'create-button']);
?>
</div>
<?php
ActiveForm::end();
示例3:
<div class="owner-form">
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'slogan')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'logo')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'description')->widget(Widget::classname(), ['settings' => ['lang' => 'ru', 'minHeight' => 300, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => ['clips'], 'imageUpload' => Url::to(['/owner/image-upload'])]]);
?>
<?php
echo $form->field($model, 'imageOwner')->fileInput();
?>
<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();
?>