DonationFormsListTable.php
71 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\DonationForms\ListTable; |
| 4 | |
| 5 | use Give\DonationForms\ListTable\Columns\DateCreatedColumn; |
| 6 | use Give\DonationForms\ListTable\Columns\DonationCountColumn; |
| 7 | use Give\DonationForms\ListTable\Columns\DonationRevenueColumn; |
| 8 | use Give\DonationForms\ListTable\Columns\GoalColumn; |
| 9 | use Give\DonationForms\ListTable\Columns\IdColumn; |
| 10 | use Give\DonationForms\ListTable\Columns\LevelsColumn; |
| 11 | use Give\DonationForms\ListTable\Columns\ShortcodeColumn; |
| 12 | use Give\DonationForms\ListTable\Columns\StatusColumn; |
| 13 | use Give\DonationForms\ListTable\Columns\TitleColumn; |
| 14 | use Give\Framework\ListTable\ListTable; |
| 15 | |
| 16 | /** |
| 17 | * @since 2.24.0 |
| 18 | */ |
| 19 | class DonationFormsListTable extends ListTable |
| 20 | { |
| 21 | /** |
| 22 | * @since 2.24.0 |
| 23 | * |
| 24 | * @inheritDoc |
| 25 | */ |
| 26 | public function id(): string |
| 27 | { |
| 28 | return 'donationForms'; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * @since 2.24.0 |
| 33 | * |
| 34 | * @inheritDoc |
| 35 | */ |
| 36 | public function getDefaultColumns(): array |
| 37 | { |
| 38 | return [ |
| 39 | new IdColumn(), |
| 40 | new TitleColumn(), |
| 41 | new LevelsColumn(), |
| 42 | new GoalColumn(), |
| 43 | new DonationCountColumn(), |
| 44 | new DonationRevenueColumn(), |
| 45 | new ShortcodeColumn(), |
| 46 | new DateCreatedColumn(), |
| 47 | new StatusColumn(), |
| 48 | ]; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @since 2.24.0 |
| 53 | * |
| 54 | * @inheritDoc |
| 55 | */ |
| 56 | public function getDefaultVisibleColumns(): array |
| 57 | { |
| 58 | return [ |
| 59 | IdColumn::getId(), |
| 60 | TitleColumn::getId(), |
| 61 | LevelsColumn::getId(), |
| 62 | GoalColumn::getId(), |
| 63 | DonationCountColumn::getId(), |
| 64 | DonationRevenueColumn::getId(), |
| 65 | ShortcodeColumn::getId(), |
| 66 | DateCreatedColumn::getId(), |
| 67 | StatusColumn::getId(), |
| 68 | ]; |
| 69 | } |
| 70 | } |
| 71 |