1 | <?php namespace EmailLog\Core\UI\ListTable; |
||
12 | class LogListTable extends \WP_List_Table { |
||
13 | /** |
||
14 | * @var object The page where this table is rendered. |
||
15 | * |
||
16 | * @since 2.0 |
||
17 | */ |
||
18 | protected $page; |
||
19 | |||
20 | /** |
||
21 | * Set up a constructor that references the parent constructor. |
||
22 | * |
||
23 | * We use the parent reference to set some default configs. |
||
24 | */ |
||
25 | 1 | public function __construct( $page, $args = array() ) { |
|
37 | |||
38 | /** |
||
39 | * Adds extra markup in the toolbars before or after the list. |
||
40 | * |
||
41 | * @access protected |
||
42 | * |
||
43 | * @param string $which Add the markup after (bottom) or before (top) the list. |
||
44 | */ |
||
45 | protected function extra_tablenav( $which ) { |
||
56 | |||
57 | /** |
||
58 | * Returns the list of column and title names. |
||
59 | * |
||
60 | * @see WP_List_Table::single_row_columns() |
||
61 | * |
||
62 | * @return array An associative array containing column information: 'slugs'=>'Visible Titles'. |
||
63 | */ |
||
64 | 1 | public function get_columns() { |
|
80 | |||
81 | /** |
||
82 | * Returns the list of columns. |
||
83 | * |
||
84 | * @access protected |
||
85 | * |
||
86 | * @return array<string,array<string|boolean>> An associative array containing all the columns |
||
87 | * that should be sortable: 'slugs'=>array('data_values',bool). |
||
88 | */ |
||
89 | protected function get_sortable_columns() { |
||
97 | |||
98 | /** |
||
99 | * Returns value for default columns. |
||
100 | * |
||
101 | * @access protected |
||
102 | * |
||
103 | * @param object $item Data object. |
||
104 | * @param string $column_name Column Name. |
||
105 | */ |
||
106 | protected function column_default( $item, $column_name ) { |
||
117 | |||
118 | /** |
||
119 | * Display sent date column. |
||
120 | * |
||
121 | * @access protected |
||
122 | * |
||
123 | * @param object $item Current item object. |
||
124 | * @return string Markup to be displayed for the column. |
||
125 | */ |
||
126 | protected function column_sent_date( $item ) { |
||
180 | |||
181 | /** |
||
182 | * To field. |
||
183 | * |
||
184 | * @access protected |
||
185 | * |
||
186 | * @param object $item |
||
187 | * @return string |
||
188 | */ |
||
189 | protected function column_to( $item ) { |
||
192 | |||
193 | /** |
||
194 | * Subject field. |
||
195 | * |
||
196 | * @access protected |
||
197 | * |
||
198 | * @param object $item |
||
199 | * @return string |
||
200 | */ |
||
201 | protected function column_subject( $item ) { |
||
204 | |||
205 | /** |
||
206 | * Markup for action column. |
||
207 | * |
||
208 | * @access protected |
||
209 | * |
||
210 | * @param object $item |
||
211 | * @return string |
||
212 | */ |
||
213 | protected function column_cb( $item ) { |
||
220 | |||
221 | /** |
||
222 | * Specify the list of bulk actions. |
||
223 | * |
||
224 | * @access protected |
||
225 | * |
||
226 | * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'. |
||
227 | */ |
||
228 | protected function get_bulk_actions() { |
||
236 | |||
237 | /** |
||
238 | * Prepare data for display. |
||
239 | */ |
||
240 | public function prepare_items() { |
||
258 | |||
259 | /** |
||
260 | * Displays default message when no items are found. |
||
261 | */ |
||
262 | public function no_items() { |
||
265 | |||
266 | /** |
||
267 | * Displays the search box. |
||
268 | * |
||
269 | * @since 2.0 |
||
270 | * |
||
271 | * @param string $text The 'submit' button label. |
||
272 | * @param string $input_id ID attribute value for the search input field. |
||
273 | */ |
||
274 | public function search_box( $text, $input_id ) { |
||
297 | } |
||
298 |