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


PHP CInputWidget::init方法代码示例

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


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

示例1: init

 public function init()
 {
     $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'source';
     $this->baseurl = Yii::app()->getAssetManager()->publish($dir);
     $this->kcFinderPath = $this->baseurl . "/kcfinder/";
     parent::init();
 }
开发者ID:SallyU,项目名称:footprints,代码行数:7,代码来源:CKkceditor.php

示例2: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Yii::import('bootstrap.behaviors.TbWidget');
     $this->attachBehavior('tbWidget', new TbWidget());
     if (!isset($this->assetPath)) {
         $this->assetPath = realpath(dirname(__FILE__) . '/../assets');
     }
     if (!$this->asDropDownList && !isset($this->pluginOptions['data'])) {
         $this->pluginOptions['data'] = $this->normalizeData($this->data);
     }
     if (isset($this->htmlOptions['placeholder'])) {
         if ($this->asDropDownList) {
             $this->htmlOptions['prompt'] = $this->htmlOptions['placeholder'];
         } else {
             $this->pluginOptions['placeholder'] = $this->htmlOptions['placeholder'];
         }
         unset($this->htmlOptions['placeholder']);
     }
     if (!$this->bindPlugin) {
         $this->htmlOptions['data-plugin'] = 'select2';
         $this->htmlOptions['data-plugin-options'] = CJSON::encode($this->pluginOptions);
     }
     if (TbArray::popValue('block', $this->htmlOptions, false)) {
         TbHtml::addCssClass('input-block-level', $this->htmlOptions);
     }
 }
开发者ID:nkovacs,项目名称:yiistrap-select2,代码行数:30,代码来源:TbSelect2.php

示例3: init

 /**
  * Initialize the widget
  */
 public function init()
 {
     //Publish assets
     $this->publishAssets();
     $this->registerClientScripts();
     parent::init();
 }
开发者ID:yunsite,项目名称:my-advertise,代码行数:10,代码来源:Ueditor.php

示例4: init

 public function init()
 {
     parent::init();
     if (empty($this->model) || empty($this->attribute)) {
         throw new Exception("Model and Attribute must be declared");
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:7,代码来源:Codemirror.php

示例5: init

 public function init()
 {
     list($this->name, $this->id) = $this->resolveNameID();
     //не стал делать сеттер, если хочешь допиши
     $this->attachBehaviors($this->behaviors());
     parent::init();
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:7,代码来源:InputWidget.php

示例6: init

 /**
  * @throws \yii\base\InvalidConfigException
  */
 public function init()
 {
     parent::init();
     $this->options['class'] = $this->el;
     Yii::setAlias('@sirtrevorjs', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..');
     $this->registerAsset();
     echo $this->renderInput();
 }
开发者ID:perminder-klair,项目名称:yii2-sir-trevor-js,代码行数:11,代码来源:ESirTrevor.php

示例7: init

 public function init()
 {
     parent::init();
     list($name, $id) = $this->resolveNameID();
     $config = array("id" => $id, "height" => $this->height, "autogrow" => $this->autogrow);
     $js = 'window.setTimeout(function() { chive.initAce(' . json_encode($config) . '); }, 1000);';
     Yii::app()->clientScript->registerScript('Yii.AceEditor.' . $this->id, $js, CClientScript::POS_END);
 }
开发者ID:cebe,项目名称:chive,代码行数:8,代码来源:AceEditor.php

示例8: init

 public function init()
 {
     parent::init();
     Yii::import('bootstrap.behaviors.TbWidget');
     $this->attachBehavior('tbWidget', new TbWidget());
     if (!isset($this->assetPath)) {
         $this->assetPath = realpath(dirname(__FILE__) . '/../assets');
     }
 }
开发者ID:nkovacs,项目名称:yiistrap-datetimepicker,代码行数:9,代码来源:TbDateTimePickerAssets.php

示例9: init

 public function init()
 {
     $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'source';
     $this->baseurl = Yii::app()->getAssetManager()->publish($dir);
     $this->kcFinderPath = $this->baseurl;
     $cs = Yii::app()->clientScript;
     $cs->registerCssFile($this->baseurl . "/run/kcfinder.css", "screen");
     $cs->registerScriptFile($this->baseurl . "/run/kcfinder.js");
     parent::init();
 }
开发者ID:fobihz,项目名称:cndiesel,代码行数:10,代码来源:Ckcfinder.php

示例10: init

 public function init()
 {
     if (!isset($this->options['allowTimes'])) {
         $this->options['allowTimes'] = array();
         for ($i = 0; $i < 24; $i++) {
             $hour = str_pad($i, 2, 0, STR_PAD_LEFT);
             $minutes = str_pad($i, 2, 0, STR_PAD_LEFT);
             $this->options['allowTimes'][] = $hour . ':00';
             $this->options['allowTimes'][] = $hour . ':30';
         }
     }
     return parent::init();
 }
开发者ID:blogfor,项目名称:activity,代码行数:13,代码来源:jqueryDateTime.php

示例11: init

 public function init()
 {
     parent::init();
     Yii::import('bootstrap.behaviors.TbWidget');
     $this->attachBehavior('tbWidget', new TbWidget());
     if (!isset($this->assetPath)) {
         $this->assetPath = realpath(dirname(__FILE__) . '/../assets');
     }
     if (!$this->bindPlugin) {
         $this->htmlOptions['data-plugin'] = 'datetimepicker';
         $this->htmlOptions['data-plugin-options'] = CJSON::encode($this->pluginOptions);
     }
 }
开发者ID:nkovacs,项目名称:yiistrap-datetimepicker,代码行数:13,代码来源:TbDateTimePicker.php

示例12: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Yii::import('bootstrap.behaviors.TbWidget');
     $this->attachBehavior('tbWidget', new TbWidget());
     if (!isset($this->assetPath)) {
         $this->assetPath = Yii::getPathOfAlias('lib.bootstrap-wysihtml5');
     }
     if (!$this->bindPlugin) {
         $this->htmlOptions['data-plugin'] = 'wysihtml5';
         $this->htmlOptions['data-plugin-options'] = CJSON::encode($this->pluginOptions);
     }
     TbHtml::addCssStyle('width: ' . $this->width . 'px; height: ' . $this->height . 'px;', $this->htmlOptions);
 }
开发者ID:juanprua,项目名称:yiistrap-widgets,代码行数:17,代码来源:TbWysihtml5.php

示例13: init

 /**
  * Init widget.
  */
 public function init()
 {
     parent::init();
     if ($this->selector === null) {
         list($this->name, $this->id) = $this->resolveNameID();
         $this->htmlOptions['id'] = $this->getId();
         $this->selector = '#' . $this->getId();
         if ($this->hasModel()) {
             echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo CHtml::textArea($this->name, $this->value, $this->htmlOptions);
         }
     }
     $this->registerClientScript();
 }
开发者ID:sepaker,项目名称:yupe,代码行数:18,代码来源:ImperaviRedactorWidget.php

示例14: init

 /**
  * Init widget
  */
 public function init()
 {
     parent::init();
     if ($this->assetsPath === null) {
         $this->assetsPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
     }
     if ($this->assetsUrl === null) {
         $this->assetsUrl = Yii::app()->assetManager->publish($this->assetsPath);
     }
     if ($this->selector === null) {
         list($this->name, $this->id) = $this->resolveNameId();
         $this->selector = '#' . $this->id;
     }
     $this->registerClientScript();
 }
开发者ID:Telemedellin,项目名称:tm,代码行数:18,代码来源:ERedactorWidget.php

示例15: init

 public function init()
 {
     $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'source';
     $this->baseurl = Yii::app()->getAssetManager()->publish($dir);
     $cs = Yii::app()->clientScript;
     $cs->registerCoreScript('jquery');
     $cs->registerCoreScript('jquery.ui');
     $cs->registerScriptFile($this->baseurl . "/jquery.tmpl.min.js");
     $cs->registerScriptFile($this->baseurl . "/jquery.iframe-transport.js");
     $cs->registerScriptFile($this->baseurl . "/jquery.fileupload.js");
     $cs->registerScriptFile($this->baseurl . "/jquery.fileupload-ui.js");
     $cs->registerScriptFile($this->baseurl . "/application.js");
     $cs->registerCssFile("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css", "screen");
     $cs->registerCssFile($this->baseurl . "/jquery.fileupload-ui.css", "screen");
     parent::init();
 }
开发者ID:fobihz,项目名称:cndiesel,代码行数:16,代码来源:HZupload.php


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