コード例 #1
0
 /**
  * Render the object into a string.
  *
  * @return mixed
  */
 public function render()
 {
     if ($this->paginator->hasPages()) {
         return new Node('nav', ['class' => 'text-xs-center'], [new UnorderedList(['class' => 'pagination'], $this->getLinks())]);
     }
     return new Node('nav', [], []);
 }
コード例 #2
0
 /**
  * Determine if the underlying paginator being presented has pages to show.
  *
  * @return bool
  */
 public function hasPages()
 {
     return $this->paginator->hasPages();
 }
コード例 #3
0
ファイル: DouyasiPresenter.php プロジェクト: ycms/framework
 /**
  * 是否需要分页
  *
  * @return bool
  */
 public function hasPages()
 {
     return $this->paginator->hasPages() && count($this->paginator->items()) > 0;
 }
コード例 #4
0
 /**
  * Render the object into a string.
  *
  * @return mixed
  */
 public function render()
 {
     return Std::firstBias($this->paginator->hasPages(), function () {
         return new CardBlock(['class' => 'card-block text-center'], new BootstrapFourPaginatorPresenter($this->paginator));
     }, '');
 }