This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make simplePaginate() ready. create PaginationHTML class.
- Loading branch information
Showing
6 changed files
with
200 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?php namespace Landish\Pagination; | ||
|
||
class PaginationHTML { | ||
|
||
/** | ||
* Pagination wrapper HTML. | ||
* | ||
* @var string | ||
*/ | ||
protected $paginationWrapper = '<ul class="pagination">%s %s %s</ul>'; | ||
|
||
/** | ||
* Available page wrapper HTML. | ||
* | ||
* @var string | ||
*/ | ||
protected $availablePageWrapper = '<li><a href="%s">%s</a></li>'; | ||
|
||
/** | ||
* Get active page wrapper HTML. | ||
* | ||
* @var string | ||
*/ | ||
protected $activePageWrapper = '<li class="active"><span>%s</span></li>'; | ||
|
||
/** | ||
* Get disabled page wrapper HTML. | ||
* | ||
* @var string | ||
*/ | ||
protected $disabledPageWrapper = '<li class="disabled"><span>%s</span></li>'; | ||
|
||
/** | ||
* Previous button text. | ||
* | ||
* @var string | ||
*/ | ||
protected $previousButtonText = '«'; | ||
|
||
/** | ||
* Next button text. | ||
* | ||
* @var string | ||
*/ | ||
protected $nextButtonText = '»'; | ||
|
||
/*** | ||
* "Dots" text. | ||
* | ||
* @var string | ||
*/ | ||
protected $dotsText = '...'; | ||
|
||
/** | ||
* Get pagination wrapper HTML. | ||
* | ||
* @return string | ||
*/ | ||
protected function getPaginationWrapperHTML() { | ||
return $this->paginationWrapper; | ||
} | ||
|
||
/** | ||
* Get available page wrapper HTML. | ||
* | ||
* @return string | ||
*/ | ||
protected function getAvailablePageWrapperHTML() { | ||
return $this->availablePageWrapper; | ||
} | ||
|
||
/** | ||
* Get active page wrapper HTML. | ||
* | ||
* @return string | ||
*/ | ||
protected function getActivePageWrapperHTML() { | ||
return $this->activePageWrapper; | ||
} | ||
|
||
/** | ||
* Get disabled page wrapper HTML. | ||
* | ||
* @return string | ||
*/ | ||
protected function getDisabledPageWrapperHTML() { | ||
return $this->disabledPageWrapper; | ||
} | ||
|
||
/** | ||
* Get previous button text. | ||
* | ||
* @return string | ||
*/ | ||
protected function getPreviousButtonText() { | ||
return $this->previousButtonText; | ||
} | ||
|
||
/** | ||
* Get next button text. | ||
* | ||
* @return string | ||
*/ | ||
protected function getNextButtonText() { | ||
return $this->nextButtonText; | ||
} | ||
|
||
/*** | ||
* Get "dots" text. | ||
* | ||
* @return string | ||
*/ | ||
protected function getDotsText() { | ||
return $this->dotsText; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php namespace Landish\Pagination\Simple; | ||
|
||
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract; | ||
use Landish\Pagination\Pagination as PaginationPresenter; | ||
|
||
class Pagination extends PaginationPresenter { | ||
|
||
/** | ||
* Pagination wrapper HTML. | ||
* | ||
* @var string | ||
*/ | ||
protected $paginationWrapper = '<ul class="pager">%s %s %s</ul>'; | ||
|
||
/** | ||
* Create a simple Pagination presenter. | ||
* | ||
* @param \Illuminate\Contracts\Pagination\Paginator $paginator | ||
*/ | ||
public function __construct(PaginatorContract $paginator) | ||
{ | ||
$this->paginator = $paginator; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php namespace Landish\Pagination\Simple; | ||
|
||
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract; | ||
use Landish\Pagination\SemanticUI as SemanticUIPresenter; | ||
|
||
class SemanticUI extends SemanticUIPresenter { | ||
|
||
/** | ||
* Create a simple Pagination presenter. | ||
* | ||
* @param \Illuminate\Contracts\Pagination\Paginator $paginator | ||
*/ | ||
public function __construct(PaginatorContract $paginator) | ||
{ | ||
$this->paginator = $paginator; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php namespace Landish\Pagination\Simple; | ||
|
||
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract; | ||
use Landish\Pagination\UIKit as UIKitPresenter; | ||
|
||
class UIKit extends UIKitPresenter { | ||
|
||
/** | ||
* Create a simple Pagination presenter. | ||
* | ||
* @param \Illuminate\Contracts\Pagination\Paginator $paginator | ||
*/ | ||
public function __construct(PaginatorContract $paginator) | ||
{ | ||
$this->paginator = $paginator; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php namespace Landish\Pagination\Simple; | ||
|
||
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract; | ||
use Landish\Pagination\ZurbFoundation as ZurbFoundationPresenter; | ||
|
||
class ZurbFoundation extends ZurbFoundationPresenter { | ||
|
||
/** | ||
* Create a simple Pagination presenter. | ||
* | ||
* @param \Illuminate\Contracts\Pagination\Paginator $paginator | ||
*/ | ||
public function __construct(PaginatorContract $paginator) | ||
{ | ||
$this->paginator = $paginator; | ||
} | ||
|
||
} |