File tree Expand file tree Collapse file tree
view/adminhtml/templates/form/field_type Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- /** @version 0.3.3 */
5-
64use Magento \Framework \Data \OptionSourceInterface ;
75use Magento \Framework \Escaper ;
86use Magento \Framework \View \Element \Template ;
97use Loki \AdminComponents \Form \Field \Field ;
108use Loki \AdminComponents \Form \Field \FieldType \Select ;
119use Loki \Components \Util \Block \TemplateRenderer ;
1210
11+ /** @version 0.3.3 */
1312/** @var Template $block */
1413/** @var Field $field */
1514/** @var Select $fieldType */
@@ -22,6 +21,11 @@ $options = $field->getOptions();
2221$ emptyOption = $ field ->getEmptyOption ();
2322$ fieldType = $ field ->getFieldType ();
2423$ fieldAttributes = $ field ->getFieldAttributes ();
24+
25+ if (false === $ options instanceof OptionSourceInterface) {
26+ echo '$options is not a proper instance ' ;
27+ return ;
28+ }
2529?>
2630<select
2731 aria-label="<?= $ escaper ->escapeHtml ($ field ->getLabel ()) ?> "
You can’t perform that action at this time.
0 commit comments