/** * @inheritdoc */ public function run() { parent::run(); $id = $this->options['id']; ListViewAsset::register($this->getView()); $this->registerClientOptions($id); $this->registerClientEvents($id); }
/** * 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});"); }
/** * 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(); }
/** * @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(); }
/** * @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; }
<?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();