本文整理匯總了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();
}