Commit e860f218 by artur

Add param for configuring rendering result with one page

parent e19737e1
...@@ -98,6 +98,10 @@ class LinkPager extends Widget ...@@ -98,6 +98,10 @@ class LinkPager extends Widget
* @see registerLinkTags() * @see registerLinkTags()
*/ */
public $registerLinkTags = false; public $registerLinkTags = false;
/**
* @var boolean Render widget when only one page exist. Defaults to `false`.
*/
public $showWrapper = false;
/** /**
* Initializes the pager. * Initializes the pager.
...@@ -141,7 +145,7 @@ class LinkPager extends Widget ...@@ -141,7 +145,7 @@ class LinkPager extends Widget
protected function renderPageButtons() protected function renderPageButtons()
{ {
$pageCount = $this->pagination->getPageCount(); $pageCount = $this->pagination->getPageCount();
if ($pageCount < 2) { if ($pageCount < 2 && !$this->showWrapper) {
return ''; return '';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment