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


PHP CInputWidget::run方法代码示例

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


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

示例1: run

 public function run()
 {
     parent::run();
     // Saves $id will be the id of the element that ckeditor will target
     list($name, $id) = $this->resolveNameID();
     // Publish assets to public directory
     $baseDir = dirname(__FILE__);
     $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($assets . '/ckeditor.js');
     echo CHtml::activeTextArea($this->model, $this->attribute, array('rows' => 10, 'cols' => 70));
     $this->options = array_merge(array('filebrowserBrowseUrl' => array('/backend/elfinderBrowse'), 'height' => '250px', 'allowedContent' => true), $this->options);
     $this->setConfig($this->options);
     $this->ECKE->replace($id, $this->_config);
 }
开发者ID:kuzmina-mariya,项目名称:gallery,代码行数:15,代码来源:ECKEditorWidget.php

示例2: run

    public function run()
    {
        parent::run();
        list($name, $id) = $this->resolveNameID();
        $baseDir = dirname(__FILE__);
        $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($assets . '/ckeditor.js');
        $this->htmlOptions['id'] = $id;
        //        $this->htmlOptions['class'] = 'ckeditor';
        if (!array_key_exists('style', $this->htmlOptions)) {
            $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
        }
        if (!array_key_exists('cols', $this->htmlOptions)) {
            $this->htmlOptions['cols'] = self::COLS;
        }
        if (!array_key_exists('rows', $this->htmlOptions)) {
            $this->htmlOptions['rows'] = self::ROWS;
        }
        $options = $this->makeOptions();
        $js = <<<EOP
CKEDITOR.replace('{$name}',{$options});
EOP;
        $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        if ($this->hasModel()) {
            $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
    }
开发者ID:lhfcainiao,项目名称:basic,代码行数:31,代码来源:CKEditor.php

示例3: run

 /**
  * 运行
  */
 public function run()
 {
     parent::run();
     $assets = $this->getAssetsPath();
     $clientScript = Yii::app()->getClientScript();
     $clientScript->registerScriptFile($assets . '/ueditor.config.js', CClientScript::POS_END);
     $clientScript->registerScriptFile($assets . '/ueditor.all.min.js', CClientScript::POS_END);
     $clientScript->registerScriptFile($assets . '/lang/' . $this->language . '.js', CClientScript::POS_END);
     $clientScript->registerScript('content', $this->makeOptions(), CClientScript::POS_END);
 }
开发者ID:njz817,项目名称:ycms,代码行数:13,代码来源:Ueditor.php

示例4: run

 /**
  * 运行
  */
 public function run()
 {
     parent::run();
     $this->assets = $assets = $this->getAssetsPath();
     $this->displayHtml();
     $clientScript = Yii::app()->getClientScript();
     $clientScript->registerCssFile($assets . '/default.css');
     $clientScript->registerScriptFile($assets . '/resumable.js', CClientScript::POS_END);
     $clientScript->registerScriptFile($assets . '/upload.js', CClientScript::POS_END);
 }
开发者ID:jerrylsxu,项目名称:yiifcms,代码行数:13,代码来源:Resumable.php

示例5: run

 public function run()
 {
     parent::run();
     $assets = $this->getAssetsPath();
     $cs = Yii::app()->getClientScript();
     $cs->registerCssFile($assets . '/themes/default/default.css');
     $cs->registerCssFile($assets . '/plugins/code/prettify.css');
     $cs->registerScriptFile($assets . '/kindeditor.js', CClientScript::POS_HEAD);
     $cs->registerScriptFile($assets . '/lang/zh_CN.js', CClientScript::POS_HEAD);
     $cs->registerScriptFile($assets . '/plugins/code/prettify.js', CClientScript::POS_HEAD);
     $cs->registerScript('content', $this->makeOptions(), CClientScript::POS_HEAD);
 }
开发者ID:s-nice,项目名称:24int,代码行数:12,代码来源:KindEditor.php

示例6: run

    public function run()
    {
        parent::run();
        list($name, $id) = $this->resolveNameID();
        $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets');
        $options = $this->makeOptions();
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($assets . '/ckeditor.js');
        $this->htmlOptions['id'] = $id;
        $js = <<<EOP
CKEDITOR.replace('{$name}',{$options});
EOP;
        $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        if ($this->hasModel()) {
            $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
    }
开发者ID:balrok,项目名称:aiajaya,代码行数:20,代码来源:CKEditor.php

示例7: run

 /**
  * Init widget
  */
 public function run()
 {
     parent::run();
     list($name, $id) = $this->resolveNameID();
     $baseDir = dirname(__FILE__);
     $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'markitup' . DIRECTORY_SEPARATOR . 'markitup');
     $cs = Yii::app()->getClientScript();
     $widgetPath = Yii::getPathOfAlias('widgets.markitup.markitup.markitup.sets.' . $this->editorType);
     $cs->registerScriptFile($assets . '/jquery.markitup.js', CClientScript::POS_END);
     $cs->registerScriptFile($assets . '/sets/' . $this->editorType . '/set.js', CClientScript::POS_END);
     $cs->registerCssFile($assets . '/skins/simple/style.css');
     $cs->registerCssFile($assets . '/sets/' . $this->editorType . '/style.css');
     if ($this->hasModel()) {
         $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
     } else {
         $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
     }
     $js = "\$('#{$id}').markItUp(mySettings);";
     $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_READY);
     echo $html;
 }
开发者ID:IuriiP,项目名称:yii-tracker,代码行数:24,代码来源:markitup.php

示例8: run

 /**
  * 运行
  */
 public function run()
 {
     parent::run();
     $assets = $this->getAssetsPath();
     $clientScript = Yii::app()->getClientScript();
     $clientScript->registerCssFile($assets . '/themes/default/default.css');
     $clientScript->registerScriptFile($assets . '/kindeditor-min.js', CClientScript::POS_END);
     $clientScript->registerScriptFile($assets . '/lang/' . $this->language . '.js', CClientScript::POS_END);
     $clientScript->registerScript('content', $this->makeOptions(), CClientScript::POS_END);
 }
开发者ID:diandianxiyu,项目名称:Yii1.x-admin,代码行数:13,代码来源:KindEditor.php

示例9: run

 public function run()
 {
     parent::run();
     $this->widget('bootstrap.widgets.TbCKEditor', array('model' => $this->model, 'attribute' => $this->attribute, 'editorOptions' => $this->options));
 }
开发者ID:sepaker,项目名称:yupe,代码行数:5,代码来源:ECKEditorWidget.php

示例10: run

    public function run()
    {
        parent::run();
        $assets = $this->assets;
        // here any option is overriden by user's options
        list($name, $id) = $this->resolveNameID();
        $options = $this->makeOptions();
        $cs = Yii::app()->getClientScript();
        $this->htmlOptions['id'] = $id;
        if (!array_key_exists('style', $this->htmlOptions)) {
            $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
        }
        if (!array_key_exists('cols', $this->htmlOptions)) {
            $this->htmlOptions['cols'] = self::COLS;
        }
        if (!array_key_exists('rows', $this->htmlOptions)) {
            $this->htmlOptions['rows'] = self::ROWS;
        }
        $js = <<<EOP
CKEDITOR.replace('{$name}',{$options});
EOP;
        $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        if ($this->hasModel()) {
            $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
    }
开发者ID:snipesn,项目名称:UkrYama-2,代码行数:29,代码来源:CKEditor.php

示例11: run

    public function run()
    {
        parent::run();
        list($name, $id) = $this->resolveNameID();
        $baseDir = dirname(__FILE__);
        $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
        $options = $this->makeOptions();
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($assets . '/ckeditor/ckeditor.js');
        $cs->registerScriptFile($assets . '/AjexFileManager/ajex.js');
        $cs->registerScriptFile($assets . '/clone.js');
        $this->htmlOptions['id'] = $id;
        if (!array_key_exists('style', $this->htmlOptions)) {
            $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
        }
        if (!array_key_exists('cols', $this->htmlOptions)) {
            $this->htmlOptions['cols'] = self::COLS;
        }
        if (!array_key_exists('rows', $this->htmlOptions)) {
            $this->htmlOptions['rows'] = self::ROWS;
        }
        $js = <<<EOP
        CKEDITOR.ELEMENT_MODE_REPLACE=true;
var ckeditor = CKEDITOR.replace('{$name}',{$options});
var {$id}_afm=clone(AjexFileManager);
{$id}_afm.init({
\treturnTo: 'ckeditor',
\teditor: ckeditor,
\tpath: '{$assets}/AjexFileManager/',
});
EOP;
        $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        Yii::app()->clientScript->registerScript('Yii.' . get_class($this) . '#' . $id, "var CKEDITOR_BASEPATH='{$assets}/ckeditor/'", CClientScript::POS_BEGIN);
        if ($this->hasModel()) {
            $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
    }
开发者ID:hit-shappens,项目名称:testapp,代码行数:40,代码来源:CKEditor.php

示例12: run

 /**
  * Run the widget
  */
 public function run()
 {
     parent::run();
 }
开发者ID:yunsite,项目名称:my-advertise,代码行数:7,代码来源:Ueditor.php

示例13: run

    public function run()
    {
        parent::run();
        list($name, $id) = $this->resolveNameID();
        $baseDir = dirname(__FILE__);
        $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
        $options = $this->makeOptions();
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($assets . '/ckeditor.js');
        $cs->registerScriptFile($assets . '/ckfinder/ckfinder.js');
        $this->htmlOptions['id'] = $id;
        //        $this->htmlOptions['fmt'] = 'fck';
        if (!array_key_exists('style', $this->htmlOptions)) {
            $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
        }
        if (!array_key_exists('cols', $this->htmlOptions)) {
            $this->htmlOptions['cols'] = self::COLS;
        }
        if (!array_key_exists('rows', $this->htmlOptions)) {
            $this->htmlOptions['rows'] = self::ROWS;
        }
        $js = <<<EOP
        function loadCKE_{$id}(){
CKEDITOR.replace('{$name}',{$options});
}
CKFinder.setupCKEditor(CKEDITOR, '{$assets}/ckfinder/');
EOP;
        //$cs->registerScript('Yii.'.get_class($this).'#'.$id, $js, CClientScript::POS_LOAD);
        if ($this->onLoad) {
            $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js . "loadCKE_" . $id . "();", CClientScript::POS_LOAD);
        } else {
            $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        }
        if ($this->hasModel()) {
            $html = "";
            if (!$this->onLoad) {
                $html = CHtml::button("Turn on EDITOR", array("onClick" => "loadCKE_" . $id . "();"));
            }
            $html .= CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            if (isset($_POST[$name])) {
                $this->value = $_POST[$name];
            }
            $html = "";
            if (!$this->onLoad) {
                $html = CHtml::button("Turn on EDITOR", array("onClick" => "loadCKE_" . $id . "();"));
            }
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
    }
开发者ID:CrystReal,项目名称:Site_backend,代码行数:51,代码来源:CKEditor.php

示例14: run

    public function run()
    {
        parent::run();
        list($name, $id) = $this->resolveNameID();
        $baseDir = dirname(__FILE__);
        $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
        $options = $this->makeOptions();
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($assets . '/ckeditor.js');
        $this->htmlOptions['id'] = $id;
        if (!array_key_exists('style', $this->htmlOptions)) {
            $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
        }
        if (!array_key_exists('cols', $this->htmlOptions)) {
            $this->htmlOptions['cols'] = self::COLS;
        }
        if (!array_key_exists('rows', $this->htmlOptions)) {
            $this->htmlOptions['rows'] = self::ROWS;
        }
        if ($this->editorTemplate == 'basic') {
            $js = <<<EOP
CKEDITOR.replace('{$name}', { toolbarGroups : [
\t
\t\t{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
\t\t{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
\t\t{ name: 'styles' },
\t\t{ name: 'colors' }],
\t\theight: '{$this->height}'});
EOP;
        } else {
            $js = <<<EOP
CKEDITOR.replace('{$name}',{$options});
EOP;
        }
        $cs->registerScript('Yii.' . get_class($this) . '#' . $id, $js, CClientScript::POS_LOAD);
        if ($this->hasModel()) {
            $html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $html = CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        echo $html;
        $js_conf = <<<EOP
if(typeof CKEDITOR !== 'undefined') {
\t\t\t\t
\tCKEDITOR.on( 'instanceReady', function( ev ) {
\t\t// Output paragraphs as <p>Text</p>.
\t\tev.editor.dataProcessor.writer.setRules( '*', {
\t\t\tindent: false,
\t\t\tbreakBeforeOpen: true,
\t\t\tbreakAfterOpen: false,
\t\t\tbreakBeforeClose: false,
\t\t\tbreakAfterClose: true
\t\t});
\t});
}
EOP;
        $cs->registerScript('body', $js_conf, CClientScript::POS_LOAD);
    }
开发者ID:Wiedzal,项目名称:narisuemvse,代码行数:58,代码来源:ECKEditor.php

示例15: run

 public function run()
 {
     parent::run();
     // Saves $id will be the id of the element that ckeditor will target
     list($name, $id) = $this->resolveNameID();
     // Publish assets to public directory
     $baseDir = dirname(__FILE__);
     $assets = Yii::app()->getAssetManager()->publish($baseDir . DIRECTORY_SEPARATOR . 'assets');
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($assets . '/ckeditor.js');
     echo CHtml::activeTextArea($this->model, $this->attribute, array('rows' => 10, 'cols' => 70));
     $this->ECKE->replace($id, $this->_config);
 }
开发者ID:Vladimirtishenko,项目名称:val.ua,代码行数:13,代码来源:ECKEditor.php


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