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


PHP Widget::run方法代码示例

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


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

示例1: run

 /**
  * Runs the widget
  */
 public function run()
 {
     parent::run();
     if ($this->useSessionFlash) {
         $this->renderFlashAlerts();
     } else {
         $this->renderAlerts();
     }
     echo "\n" . Html::endTag('div');
 }
开发者ID:aoopvn,项目名称:EduSec4.0.0,代码行数:13,代码来源:AlertBlock.php

示例2: run

 public function run()
 {
     parent::run();
     if ($this->options !== null) {
         $tag = ArrayHelper::remove($this->options, 'tag', 'div');
         $options = ArrayHelper::merge(['id' => $this->id], $this->options);
         echo Html::tag($tag, '', $options);
         $this->clientOptions['chart']['renderTo'] = $this->id;
     }
     $this->registerClientScripts();
 }
开发者ID:omnilight,项目名称:yii2-highcharts,代码行数:11,代码来源:Highcharts.php

示例3: run

 public function run()
 {
     parent::run();
     if ($this->useFlash) {
         $this->_renderWithSession();
     } else {
         if (!isset($this->jsOptions['type']) || !isset($this->jsOptions['text'])) {
             throw new InvalidConfigException('`type` and `text` must be set. please check it.');
         }
         $this->_renderDirect();
     }
 }
开发者ID:su-xiaolin,项目名称:yii2-sweet-alert,代码行数:12,代码来源:SweetAlert.php

示例4: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     echo Html::beginTag('div', $this->options);
     echo Html::tag('div', Html::tag('h3', $this->header) . Html::tag('p', $this->text), ['class' => 'inner']);
     if (!empty($this->icon)) {
         echo Html::tag('div', new Icon($this->icon), ['class' => 'icon']);
     }
     if (!empty($this->linkLabel)) {
         echo Html::a($this->linkLabel, $this->linkRoute, ['class' => 'small-box-footer']);
     }
     echo Html::endTag('div');
     parent::run();
 }
开发者ID:yiister,项目名称:yii2-adminlte,代码行数:16,代码来源:SmallBox.php

示例5: run

 public function run()
 {
     parent::run();
     $limit_ad = FConfigParam::find()->where(['name' => 'NUMBER_AD_IN_BODY'])->one();
     if ($limit_ad) {
         $limit = $limit_ad->value;
     } else {
         $limit = 3;
     }
     $query = FAdvertise::find()->where(['is_show' => 1, 'position' => 'body', 'show_in' => $this->lan_center])->andwhere(['<=', 'start_at', new Expression('NOW()')])->andwhere(['>=', 'end_at', new Expression('NOW()')]);
     $advertise = $query->limit($limit)->all();
     return $this->render('@frontend/views/widgets/banner', ['advertises' => $advertise]);
 }
开发者ID:baobkath,项目名称:lenguage_center,代码行数:13,代码来源:banner.php

示例6: run

 public function run()
 {
     parent::run();
     $limit_Lang_most = FConfigParam::find()->where(['name' => 'NUMBER_LANGUE_IN_MOST'])->one();
     if ($limit_Lang_most) {
         $limit = $limit_Lang_most->value;
     } else {
         $limit = 10;
     }
     $query = FLanguecenter::find()->where(['is_show' => 1])->orderBy('number DESC');
     $mostViewlangs = $query->limit($limit)->all();
     return $this->render('@frontend/views/widgets/mostView', ['mostViewlangs' => $mostViewlangs]);
 }
开发者ID:baobkath,项目名称:lenguage_center,代码行数:13,代码来源:mostView.php

示例7: run

 public function run()
 {
     parent::run();
     $limit_ad = FConfigParam::find()->where(['name' => 'NUMBER_IMAGE_TOP'])->one();
     if ($limit_ad) {
         $limit = $limit_ad->value;
     } else {
         $limit = 3;
     }
     $query = FAdvertise::find()->where(['is_show' => 1, 'position' => 'top', 'type' => 'image', 'show_in' => $this->lan_center]);
     $advertise = $query->limit($limit)->all();
     $banner = null;
     if (!$advertise) {
         $query1 = FAdvertise::find()->where(['is_show' => 1, 'position' => 'top', 'type' => 'image', 'show_in' => null]);
         $banner = $query1->one();
         //print_r($banner);
         //die('hello');
     }
     return $this->render('@frontend/views/widgets/bannertop', ['advertises' => $advertise, 'banner' => $banner]);
 }
开发者ID:baobkath,项目名称:lenguage_center,代码行数:20,代码来源:bannertop.php

示例8: run

    public function run()
    {
        parent::run();
        $content = Html::submitButton($this->model->isNewRecord ? self::t('messages', 'Create') : self::t('messages', 'Update'), ['class' => $this->model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
        $jsCreateClose = <<<JS
            var action = \$(this).parents('form').attr('action');
            var submitButton =  \$(this).parent().find('button[type=submit]');
            \$(this).parents('form').attr('action', action + '&close=true');
            submitButton.click();
            return false;
JS;
        $content .= ' ' . Html::a($this->model->isNewRecord ? self::t('messages', 'Create and close') : self::t('messages', 'Update and close'), '#', ['class' => 'btn btn-default btn-sm', 'onclick' => $jsCreateClose]);
        $returnUrl = null;
        if (\Yii::$app->controller->defaultAction === null) {
            $returnUrl = \Yii::$app->user->returnUrl;
        } else {
            $returnUrl = [\Yii::$app->controller->defaultAction];
        }
        $content .= ' ' . Html::a(self::t('messages', 'Close'), $returnUrl, ['class' => 'btn btn-default btn-sm']);
        $content = Html::tag('div', $content, ['class' => 'col-sm-8']) . Html::tag('div', $this->getInfoRecord(), ['class' => 'col-sm-4 text-right']);
        return Html::tag('div', $content, ['class' => 'form-group well row']);
    }
开发者ID:sibds,项目名称:yii2-formfooter,代码行数:22,代码来源:FormFooter.php

示例9: run

 /**
  * Output collected content
  * @return string
  */
 public function run()
 {
     parent::run();
     return $this->content;
 }
开发者ID:NullRefExcep,项目名称:yii2-sb-admin-2,代码行数:9,代码来源:FlashAlert.php

示例10: run

 public function run()
 {
     parent::run();
     return $this->render('@frontend/views/widget/cropImg', ['btn_name' => $this->btn_name]);
 }
开发者ID:baobkath,项目名称:lenguage_center,代码行数:5,代码来源:cropImg.php

示例11: run

 public function run()
 {
     parent::run();
     return $this->render('//site/login');
 }
开发者ID:awebc,项目名称:web_xbf,代码行数:5,代码来源:Login.php

示例12: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     echo Html::endTag('div');
     echo Html::endTag('div');
     parent::run();
 }
开发者ID:yiister,项目名称:yii2-adminlte,代码行数:9,代码来源:Box.php

示例13: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     parent::run();
     echo $this->getGridOutput();
 }
开发者ID:oyoy8629,项目名称:yii-core,代码行数:8,代码来源:FormGrid.php

示例14: run

 public function run()
 {
     parent::run();
 }
开发者ID:kasoft,项目名称:yii2-jstree,代码行数:4,代码来源:JsTree.php

示例15: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     echo Html::tag('div', '', ['id' => $this->options['id']]);
     $this->registerAssets();
     parent::run();
 }
开发者ID:yii2mod,项目名称:yii2-c3-chart,代码行数:9,代码来源:Chart.php


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