codepress-admin-columns
/
classes
/
Setting
/
Control
/
OptionCollectionFactory
/
ToggleOptionCollection.php
ToggleOptionCollection.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Setting\Control\OptionCollectionFactory; |
| 6 | |
| 7 | use AC\Setting\Control\OptionCollection; |
| 8 | use AC\Setting\Control\OptionCollectionFactory; |
| 9 | |
| 10 | final class ToggleOptionCollection implements OptionCollectionFactory |
| 11 | { |
| 12 | |
| 13 | public const ON = 'on'; |
| 14 | public const OFF = 'off'; |
| 15 | |
| 16 | public function create(): OptionCollection |
| 17 | { |
| 18 | return OptionCollection::from_array([ |
| 19 | self::ON, |
| 20 | self::OFF, |
| 21 | ], false); |
| 22 | } |
| 23 | |
| 24 | } |