Column.php
3 years ago
Table.php
3 years ago
Table_Campaigns.php
3 years ago
Table_Geo.php
3 years ago
Table_Pages.php
3 years ago
Table_Referrers.php
3 years ago
Column.php
51 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\IAWP\Tables; |
| 4 | |
| 5 | class Column |
| 6 | { |
| 7 | private $id; |
| 8 | private $label; |
| 9 | private $visible; |
| 10 | private $sort_direction; |
| 11 | private $requires_woocommerce; |
| 12 | private $exportable; |
| 13 | public function __construct($options) |
| 14 | { |
| 15 | $this->id = $options['id']; |
| 16 | $this->label = $options['label']; |
| 17 | $this->visible = $options['visible']; |
| 18 | $this->sort_direction = $options['sort_direction']; |
| 19 | $this->requires_woocommerce = $options['requires_woocommerce'] ?? \false; |
| 20 | $this->exportable = $options['exportable'] ?? \true; |
| 21 | } |
| 22 | public function id() : string |
| 23 | { |
| 24 | return $this->id; |
| 25 | } |
| 26 | public function label() : string |
| 27 | { |
| 28 | return $this->label; |
| 29 | } |
| 30 | public function visible() : bool |
| 31 | { |
| 32 | return $this->visible; |
| 33 | } |
| 34 | public function sort_direction() : string |
| 35 | { |
| 36 | return $this->sort_direction; |
| 37 | } |
| 38 | public function set_visible(bool $visible) : void |
| 39 | { |
| 40 | $this->visible = $visible; |
| 41 | } |
| 42 | public function requires_woocommerce() : bool |
| 43 | { |
| 44 | return $this->requires_woocommerce; |
| 45 | } |
| 46 | public function exportable() : bool |
| 47 | { |
| 48 | return $this->exportable; |
| 49 | } |
| 50 | } |
| 51 |