本文整理汇总了PHP中yii\bootstrap\ActiveForm::run方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveForm::run方法的具体用法?PHP ActiveForm::run怎么用?PHP ActiveForm::run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\ActiveForm
的用法示例。
在下文中一共展示了ActiveForm::run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$this->options['class'] = 'ajax-form';
parent::run();
$content = ob_get_clean();
return Html::tag('div', $content, ['class' => 'ajax-form-wrapper', 'style' => "max-width:{$this->maxWidth}px"]);
}
示例2: run
public function run()
{
echo Html::endTag('div');
$buttons = Html::tag('div', Html::submitButton(__('Search'), ['class' => 'btn btn-primary']));
echo Html::tag('div', $buttons, ['class' => 'panel-footer ' . $this->extraClass . $this->targetClass]);
echo Html::endTag('div');
parent::run();
}
示例3: run
public function run()
{
ob_start();
ob_implicit_flush(false);
parent::run();
ob_end_clean();
echo Html::endTag('div');
}
示例4: run
public function run()
{
parent::run();
if (isset(Html::$inputIdPrefix)) {
Html::$inputIdPrefix = '';
}
if (isset(Html::$inputIdSuffix)) {
Html::$inputIdSuffix = '';
}
}
示例5: run
/**
* @inheritdoc
*/
public function run()
{
$this->begin($this->config);
if ($this->displayErrorSummary) {
echo $this->errorSummary($this->model);
}
foreach ($this->fields as $field) {
if (is_array($field)) {
if (!method_exists(ActiveField::className(), $field[1])) {
echo $this->field($this->model, $field[0], isset($field[2]) ? $field[2] : [])->widget($field[1], isset($field[3]) ? $field[3] : []);
} else {
if (!stripos($field[1], 'list')) {
echo $this->field($this->model, $field[0], isset($field[2]) ? $field[2] : [])->{$field}[1](isset($field[3]) ? $field[3] : []);
} else {
echo $this->field($this->model, $field[0], isset($field[3]) ? $field[3] : [])->{$field}[1](isset($field[2]) ? $field[2] : [], isset($field[4]) ? $field[4] : []);
}
}
} elseif (is_string($field)) {
echo $this->field($this->model, $field)->textInput();
} else {
throw new InvalidConfigException('Each field should be either a string or array.');
}
}
echo Html::beginTag('div', $this->buttonGroupOptions);
foreach ($this->buttons as $btn) {
echo $btn;
}
echo Html::endTag('div');
parent::run();
}