column.php
3 years ago
table.php
3 years ago
table_campaigns.php
3 years ago
table_geo.php
3 years ago
table_referrers.php
3 years ago
table_views.php
3 years ago
column.php
59 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP; |
| 4 | |
| 5 | class Column |
| 6 | { |
| 7 | private $id; |
| 8 | private $label; |
| 9 | private $visible; |
| 10 | private $sort_direction; |
| 11 | private $requires_pro; |
| 12 | private $exportable; |
| 13 | |
| 14 | public function __construct($options) |
| 15 | { |
| 16 | $this->id = $options['id']; |
| 17 | $this->label = $options['label']; |
| 18 | $this->visible = $options['visible']; |
| 19 | $this->sort_direction = $options['sort_direction']; |
| 20 | $this->requires_pro = $options['requires_pro'] ?? false; |
| 21 | $this->exportable = $options['exportable'] ?? true; |
| 22 | } |
| 23 | |
| 24 | public function id(): string |
| 25 | { |
| 26 | return $this->id; |
| 27 | } |
| 28 | |
| 29 | public function label(): string |
| 30 | { |
| 31 | return $this->label; |
| 32 | } |
| 33 | |
| 34 | public function visible(): bool |
| 35 | { |
| 36 | return $this->visible; |
| 37 | } |
| 38 | |
| 39 | public function sort_direction(): string |
| 40 | { |
| 41 | return $this->sort_direction; |
| 42 | } |
| 43 | |
| 44 | public function set_visible(bool $visible): void |
| 45 | { |
| 46 | $this->visible = $visible; |
| 47 | } |
| 48 | |
| 49 | public function requires_pro(): bool |
| 50 | { |
| 51 | return $this->requires_pro; |
| 52 | } |
| 53 | |
| 54 | public function exportable(): bool |
| 55 | { |
| 56 | return $this->exportable; |
| 57 | } |
| 58 | } |
| 59 |