当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveForm::init方法代码示例

本文整理汇总了PHP中yii\bootstrap\ActiveForm::init方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveForm::init方法的具体用法?PHP ActiveForm::init怎么用?PHP ActiveForm::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\bootstrap\ActiveForm的用法示例。


在下文中一共展示了ActiveForm::init方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $this->fieldConfig = ['template' => "<div class=\"row\">\n                <div class=\"col-xs-6\">{label}</div>\n                <div class=\"col-xs-6\"> <span class=\"tooltip-field pull-right\"> {hint} </span> <span class=\"tooltip-error-field pull-right\"> {error} </span> </div>\n            \n<div class=\"col-xs-12\">{input}</div>\n            </div>"];
     $this->fieldClass = ActiveField::className();
     echo Html::tag('span', AmosIcons::show('alert'), ['id' => 'errore-alert-common', 'class' => 'errore-alert bk-noDisplay', 'title' => \Yii::t('app', 'La tab contiene degli errori')]);
     parent::init();
 }
开发者ID:elitedivision,项目名称:amos-core,代码行数:7,代码来源:ActiveForm.php

示例2: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     if ($this->pjax) {
         $this->options['data-pjax'] = 1;
     }
     parent::init();
 }
开发者ID:skoro,项目名称:yii2-admin-template,代码行数:10,代码来源:ActiveForm.php

示例3: init

 public function init()
 {
     $this->initForm();
     if (empty($this->fieldConfig['options']) && $this->floatingLabel && $this->layout !== 'horizontal') {
         $this->fieldConfig['options'] = ['class' => 'form-group floating-label'];
     }
     parent::init();
 }
开发者ID:singletonn,项目名称:yii2-widgets,代码行数:8,代码来源:ActiveForm.php

示例4: init

 public function init()
 {
     $this->setId(uniqid($this->getId()));
     if ($this->readOnly) {
         $this->fieldConfig['readOnly'] = true;
     }
     parent::init();
 }
开发者ID:ivan-chkv,项目名称:yii2-mozayka,代码行数:8,代码来源:ActiveForm.php

示例5: init

 public function init()
 {
     ob_start();
     ob_implicit_flush(false);
     parent::init();
     ob_end_clean();
     echo Html::beginTag('div', $this->options);
 }
开发者ID:gromver,项目名称:yii2-models,代码行数:8,代码来源:ActiveForm.php

示例6: init

 public function init()
 {
     parent::init();
     $controller = $this->getView()->context;
     $this->targetClass = $controller->id . '_' . $controller->action->id . '_' . $this->targetClass;
     echo Html::beginTag('div', ['class' => 'panel panel-info']);
     echo Html::tag('div', __('Search'), ['class' => 'panel-heading', 'data-target-class' => $this->targetClass]);
     echo Html::beginTag('div', ['class' => 'panel-body ' . $this->targetClass]);
 }
开发者ID:vvkgpt48,项目名称:merchium-advanced-app,代码行数:9,代码来源:SearchForm.php

示例7: init

 public function init()
 {
     $this->fieldConfig['horizontalCssClasses']['label'] = 'col-sm-' . $this->labelCols;
     $this->fieldConfig['horizontalCssClasses']['wrapper'] = 'col-sm-' . (self::COLS_TOTAL - $this->labelCols);
     parent::init();
     $params = Yii::$app->request->queryParams;
     if (!empty($params['_return_url'])) {
         echo Html::hiddenInput('_return_url', $params['_return_url']);
     }
 }
开发者ID:vsguts,项目名称:crm,代码行数:10,代码来源:ActiveForm.php

示例8: init

 public function init()
 {
     parent::init();
     $controller = $this->getView()->context;
     $this->targetClass = $controller->id . '_' . $controller->action->id . '_' . $this->targetClass;
     echo Html::beginTag('div', ['class' => 'panel panel-info search-form']);
     echo Html::tag('div', __('Search'), ['class' => 'panel-heading app-toggle app-toggle-save pointer', 'data-target-class' => $this->targetClass]);
     $this->extraClass = empty($_COOKIE['app-toggle-' . $this->targetClass]) ? 'h ' : '';
     echo Html::beginTag('div', ['class' => 'panel-body ' . $this->extraClass . $this->targetClass]);
 }
开发者ID:vsguts,项目名称:crm,代码行数:10,代码来源:SearchForm.php

示例9: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     //        $id = $this->options['id'];
     $clientSideKey = Yii::$app->get('braintree')->clientSideKey;
     $view = $this->getView();
     BraintreeAsset::register($view);
     //        $view->registerJs("braintree.setup('$clientSideKey', 'custom', {id: '$id'});");
     $view->registerJs("braintreeClient = new braintree.api.Client({clientToken: '{$clientSideKey}'});");
     $this->fieldClass = ActiveField::className();
 }
开发者ID:andrewblake1,项目名称:yii2-braintree,代码行数:14,代码来源:ActiveForm.php

示例10: init

 /**
  * Adds some default configuration. I.e. form name and layout class.
  * @inheritdoc
  */
 public function init()
 {
     if (!in_array($this->layout, ['default', 'horizontal', 'inline'])) {
         throw new InvalidConfigException('Invalid layout type: ' . $this->layout);
     }
     if ($this->layout !== 'default') {
         Html::addCssClass($this->options, 'form-' . $this->layout);
     }
     if ($this->name) {
         $this->options['name'] = $this->name;
     }
     parent::init();
 }
开发者ID:miptliot,项目名称:vps-tools,代码行数:17,代码来源:Form.php

示例11: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->buttonGroupOptions = array_merge(['class' => 'btn-group'], $this->buttonGroupOptions);
     if ($this->displaySubmitButton) {
         if (!$this->submitButtonLabel) {
             $this->submitButtonLabel = Yii::t('app', 'Submit');
         }
         $this->buttons[] = Html::submitButton($this->submitButtonLabel, $this->submitButtonOptions);
     }
     if ($this->displayResetButton) {
         if (!$this->resetButtonLabel) {
             $this->resetButtonLabel = Yii::t('app', 'Reset');
         }
         $this->buttons[] = Html::resetButton($this->resetButtonLabel, $this->resetButtonOptions);
     }
 }
开发者ID:daxslab,项目名称:yii2-bfobu,代码行数:20,代码来源:BootstrapFormBuilder.php

示例12: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     BraintreeAsset::register($this->getView());
     $this->fieldClass = ActiveField::className();
 }
开发者ID:znatali,项目名称:yii2-braintree,代码行数:9,代码来源:ActiveForm.php

示例13: init

 /**
  * in controller app\modules\main\controllers\ContactController
  * public function actionAjax($form) 
  * {
  * case 'call';
  * $model = new CallForm(); / your Model form
  * break;
  * }
  * in view
  * <?= Html::a('Оценка-ТЛ', ['/main/contact/ajax', 'form'=>'call'], ['class'=>'ajax-popup'])?>
  */
 public function init()
 {
     ob_start();
     parent::init();
 }
开发者ID:promo-pr,项目名称:cms,代码行数:16,代码来源:AjaxForm.php


注:本文中的yii\bootstrap\ActiveForm::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。