當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。