コード例 #1
1
ファイル: ListView.php プロジェクト: manyoubaby123/imshop
 /**
  * @inheritdoc
  */
 public function run()
 {
     parent::run();
     $id = $this->options['id'];
     ListViewAsset::register($this->getView());
     $this->registerClientOptions($id);
     $this->registerClientEvents($id);
 }
コード例 #2
0
ファイル: ListView.php プロジェクト: roman444uk/yii2
 /**
  * Runs the widget.
  */
 public function run()
 {
     parent::run();
     $options = Json::htmlEncode($this->getClientOptions());
     $view = $this->getView();
     ListViewAsset::register($view);
     $view->registerJs("jQuery('#{$this->id}').yiiListView({$options});");
 }
コード例 #3
0
ファイル: SortableListView.php プロジェクト: simplator/base
 /**
  * Runs the widget.
  */
 public function run()
 {
     $id = $this->options['id'];
     $view = $this->getView();
     $options = Json::encode(['options' => $this->clientOptions, 'encode' => $this->encode, 'action' => $this->action, 'method' => $this->method]);
     JuiAsset::register($this->getView());
     SortableListViewAsset::register($view);
     $view->registerJs("jQuery('#{$id}').sortableListView({$options});");
     parent::run();
 }
コード例 #4
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     // print empty list when there is no data to show
     if (!$this->dataProvider->getCount() && !$this->showOnEmpty) {
         return $this->listEmpty();
     }
     // use parent rendering when it is first (not partial) request
     if (!static::isPartial($this->id)) {
         return parent::run();
     }
     // print partial list
     return $this->listPartial();
 }
コード例 #5
0
ファイル: ExtListView.php プロジェクト: amnah/yii2-classes
 /**
  * @inheritdoc
  */
 public function run()
 {
     // run normal parent implementation if view is not set
     if (empty($this->layoutView)) {
         parent::run();
         return;
     }
     // check for results
     if ($this->dataProvider->getCount() > 0 || $this->showOnEmpty) {
         // get content from closure or view
         $content = $this->layoutView instanceof Closure ? call_user_func($this->layoutView) : $this->getView()->render($this->layoutView, $this->layoutViewParams);
         // replace sections
         $sections = ['{summary}', '{items}', '{pager}', '{sorter}'];
         foreach ($sections as $section) {
             if (strpos($content, $section) !== false) {
                 $content = str_replace($section, $this->renderSection($section), $content);
             }
         }
     } else {
         $content = $this->renderEmpty();
     }
     echo $content;
 }
コード例 #6
0
ファイル: detail.php プロジェクト: Jaaviieer/PrograWeb
        <?php 
echo $form->field($searchModel, 'bcc', ['options' => ['class' => 'col-lg-6']])->textInput();
?>

        <?php 
echo $form->field($searchModel, 'charset', ['options' => ['class' => 'col-lg-6']])->textInput();
?>

        <?php 
echo $form->field($searchModel, 'subject', ['options' => ['class' => 'col-lg-6']])->textInput();
?>

        <?php 
echo $form->field($searchModel, 'body', ['options' => ['class' => 'col-lg-6']])->textInput();
?>

        <div class="form-group col-lg-12">
            <?php 
echo Html::submitButton('Filter', ['class' => 'btn btn-success']);
?>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
</div>

<?php 
echo $listView->run();