We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa92de7 commit dca77fdCopy full SHA for dca77fd
1 file changed
ViewModel/Options/YesNoOptions.php
@@ -0,0 +1,29 @@
1
+<?php
2
+declare(strict_types=1);
3
+
4
+namespace Loki\AdminComponents\ViewModel\Options;
5
6
+use Magento\Framework\View\Element\Block\ArgumentInterface;
7
+use Magento\Framework\Data\OptionSourceInterface;
8
9
+class YesNoOptions implements ArgumentInterface, OptionSourceInterface
10
+{
11
+ public function toOptionArray(): array
12
+ {
13
+ $options = [];
14
15
16
+ $options[] = [
17
+ 'label' => __('Yes'),
18
+ 'value' => 1,
19
+ ];
20
21
22
23
+ 'label' => __('No'),
24
+ 'value' => 0,
25
26
27
+ return $options;
28
+ }
29
+}
0 commit comments