本文整理汇总了PHP中yii\widgets\ListView::run方法的典型用法代码示例。如果您正苦于以下问题:PHP ListView::run方法的具体用法?PHP ListView::run怎么用?PHP ListView::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\widgets\ListView
的用法示例。
在下文中一共展示了ListView::run方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* @inheritdoc
*/
public function run()
{
parent::run();
$id = $this->options['id'];
ListViewAsset::register($this->getView());
$this->registerClientOptions($id);
$this->registerClientEvents($id);
}
示例2: run
/**
* 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: run
/**
* 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: 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();
}
示例5: run
/**
* @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:
<?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();