本文整理汇总了PHP中yii\widgets\LinkPager::init方法的典型用法代码示例。如果您正苦于以下问题:PHP LinkPager::init方法的具体用法?PHP LinkPager::init怎么用?PHP LinkPager::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\widgets\LinkPager
的用法示例。
在下文中一共展示了LinkPager::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
parent::init();
$this->prevPageLabel = '上一页';
$this->nextPageLabel = '下一页';
}
示例2: init
public function init()
{
$default = ['pagination' => $this->paginationSelector, 'next' => $this->nextSelector, 'item' => $this->itemSelector, 'state' => ['isPaused' => !$this->autoStart], 'pjax' => ['container' => $this->pjaxContainer], 'bufferPx' => $this->bufferPx, 'wrapper' => $this->wrapperSelector, 'alwaysHidePagination' => $this->alwaysHidePagination];
$this->pluginOptions = ArrayHelper::merge($default, $this->pluginOptions);
InfiniteScrollAsset::register($this->view);
$this->initInfiniteScroll();
parent::init();
}
示例3: init
/**
* @inheritdoc
*/
public function init()
{
parent::init();
$this->pluginOptions = ArrayHelper::merge(['wrapper' => '.list-view', 'pagination' => '.pagination', 'next' => '.pagination .next a:first', 'bufferPx' => 40, 'pjax' => ['container' => '#scrollPagerPjaxContainer']], $this->pluginOptions);
ScrollPagerAsset::register($this->view);
$pluginOptions = Json::encode($this->pluginOptions);
$this->view->registerJs("\$('{$this->itemsContainer}').scrollPager({$pluginOptions});");
}
示例4: init
/**
* Initializes the pager.
*/
public function init()
{
$this->nextPageLabel = Yii::t('app', 'Next') . ' »';
$this->prevPageLabel = '« ' . Yii::t('app', 'Prev.');
$this->firstPageLabel = Yii::t('app', 'First');
$this->lastPageLabel = Yii::t('app', 'Last');
parent::init();
}
示例5: init
/**
* Initializes the pager.
*/
public function init()
{
$this->nextPageLabel = Module::t('Next') . ' »';
$this->prevPageLabel = '« ' . Module::t('Prev.');
$this->firstPageLabel = Module::t('First');
$this->lastPageLabel = Module::t('Last');
parent::init();
}
示例6: init
public function init()
{
parent::init();
// Enable ajax
if ($this->targetId) {
$this->linkOptions['class'] = 'app-ajax';
$this->linkOptions['data-target-id'] = $this->targetId;
}
}
示例7: init
public function init()
{
$this->activePageCssClass = $this->activeCssClass;
$this->disabledPageCssClass = $this->disabledCssClass;
$this->prevPageCssClass = $this->prevCssClass;
$this->nextPageCssClass = $this->nextCssClass;
$this->options = ['class' => 'pagination'];
$this->linkOptions = ['class' => 'paginate_button'];
parent::init();
// TODO: Change the autogenerated stub
}
示例8: init
public function init()
{
parent::init();
$this->options = ['class' => 'dataTables_paginate paging_full_numbers'];
$this->linkOptions = ['class' => 'paginate_button'];
$this->activePageCssClass = 'paginate_active';
$this->disabledPageCssClass = 'paginate_button_disabled';
$this->firstPageLabel = '首页';
$this->prevPageLabel = '上一页';
$this->nextPageLabel = '下一页';
$this->lastPageLabel = '尾页';
}
示例9: init
public function init()
{
parent::init();
if ($this->pageSizeMargin) {
Html::addCssStyle($this->pageSizeOptions, $this->pageSizeMargin);
}
if ($this->customPageWidth) {
Html::addCssStyle($this->customPageOptions, 'width:' . $this->customPageWidth . 'px;');
}
if ($this->customPageMargin) {
Html::addCssStyle($this->customPageOptions, $this->customPageMargin);
}
}
示例10: init
/**
* @inheritdoc
* @see \yii\widgets\LinkPager::init()
*/
public function init()
{
parent::init();
if ($this->itemsOrderDesc) {
$firstPageLabel = $this->firstPageLabel;
$lastPageLabel = $this->lastPageLabel;
$this->firstPageLabel = $lastPageLabel;
$this->lastPageLabel = $firstPageLabel;
$nextPageLabel = $this->nextPageLabel;
$prevPageLabel = $this->prevPageLabel;
$this->nextPageLabel = $prevPageLabel;
$this->prevPageLabel = $nextPageLabel;
}
}
示例11: init
public function init()
{
parent::init();
$this->_page_param = $this->pagination->pageParam;
$this->_page_size_param = $this->pagination->pageSizeParam;
$currentPageSize = $this->pagination->getPageSize();
// Push current pageSize to $this->pageSizeList,
// unique to avoid duplicating
if (!in_array($currentPageSize, $this->pageSizeList)) {
array_unshift($this->pageSizeList, $currentPageSize);
$this->pageSizeList = array_unique($this->pageSizeList);
// Sort
sort($this->pageSizeList, SORT_NUMERIC);
}
}
示例12: init
/**
* @inheridoc
*/
public function init()
{
parent::init();
$this->initPager();
echo Html::beginTag($this->wrapper, $this->options);
}
示例13: init
public function init()
{
if ($this->type !== 'simple') {
UI::addCssClasses($this->options, ['ui', 'pagination']);
UI::addCssClasses($this->linkOptions, 'item');
switch ($this->type) {
case 'menu':
UI::addCssClasses($this->options, [self::TYPE_MENU]);
break;
case 'basic':
UI::addCssClasses($this->options, [self::TYPE_BASIC]);
break;
default:
break;
}
switch ($this->size) {
case 'small':
UI::addCssClasses($this->options, self::SIZE_SMALL);
break;
case 'large':
UI::addCssClasses($this->options, self::SIZE_LARGE);
break;
case 'huge':
UI::addCssClasses($this->options, self::SIZE_HUGE);
break;
default:
break;
}
UI::addCssClasses($this->options, ['menu']);
} else {
$this->simplePagerSetting();
}
switch ($this->position) {
case 'right':
UI::addCssClasses($this->options, [self::POSITION_RIGHT]);
break;
default:
break;
}
parent::init();
}
示例14: init
public function init()
{
parent::init();
}
示例15: init
public function init()
{
ActiveAssets::register($this->getView());
parent::init();
}