Plugins
6 months ago
Option.php
9 months ago
Options.php
9 months ago
OptionsPlugin.php
9 months ago
Option.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\ColumnOptions; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Option |
| 7 | { |
| 8 | /** @var mixed */ |
| 9 | public $id; |
| 10 | public string $label; |
| 11 | /** @var mixed */ |
| 12 | public $parent_id; |
| 13 | public function __construct($id, string $label, $parent_id = null) |
| 14 | { |
| 15 | $this->id = $id; |
| 16 | $this->label = $label; |
| 17 | $this->parent_id = $parent_id; |
| 18 | } |
| 19 | public function is_parent() : bool |
| 20 | { |
| 21 | return \is_null($this->parent_id); |
| 22 | } |
| 23 | } |
| 24 |