1 | <?php |
||
7 | class Carbon_Pagination_Item_Page extends Carbon_Pagination_Item { |
||
8 | |||
9 | /** |
||
10 | * @var int |
||
11 | * |
||
12 | * The page number index. |
||
13 | */ |
||
14 | protected $page_number = 0; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | * |
||
19 | * The HTML of the item. |
||
20 | */ |
||
21 | protected $html = ''; |
||
22 | |||
23 | /** |
||
24 | * Setup the item before rendering. |
||
25 | * Setup item tokens. |
||
26 | */ |
||
27 | 2 | public function setup() { |
|
44 | |||
45 | /** |
||
46 | * Render the item. |
||
47 | * |
||
48 | * @return string $link The HTML of the item. |
||
49 | */ |
||
50 | 5 | public function render() { |
|
69 | |||
70 | /** |
||
71 | * Retrieve the page index number. |
||
72 | * |
||
73 | * @return int $page_number The page index number. |
||
74 | */ |
||
75 | 1 | public function get_page_number() { |
|
78 | |||
79 | /** |
||
80 | * Modify the page index number. |
||
81 | * |
||
82 | * @param int $page_number The new page index number. |
||
83 | */ |
||
84 | 1 | public function set_page_number( $page_number ) { |
|
87 | |||
88 | /** |
||
89 | * Retrieve the page item HTML. |
||
90 | * |
||
91 | * @return string $html The page item HTML. |
||
92 | */ |
||
93 | 1 | public function get_html() { |
|
96 | |||
97 | /** |
||
98 | * Modify the page item HTML. |
||
99 | * |
||
100 | * @param string $html The new page item HTML. |
||
101 | */ |
||
102 | 1 | public function set_html( $html ) { |
|
105 | |||
106 | /** |
||
107 | * Create a new subitems collection with a single subitem |
||
108 | * for the specified collection with the specified HTML and page number. |
||
109 | * |
||
110 | * @static |
||
111 | * @param Carbon_Pagination_Collection $collection Collection of the original item. |
||
112 | * @param string $html HTML of the new subitem. |
||
113 | * @param int $page_number The number of the page to link the subitem to. |
||
114 | * @return Carbon_Pagination_Collection $subitems_collection The new subitems collection. |
||
115 | */ |
||
116 | 4 | public static function generate_single_subitem_collection( $collection, $html, $page_number ) { |
|
127 | |||
128 | } |