<?php
 namespace App\Form\Input; class OrderFlag extends \Engine\Form\Input\Flag { protected function determinePossibleValues() :array { $flagsList = \App\Config\OrderFlags::getInstance()->getAll(); $return = []; if ($this->showDefaultOption) { $return[''] = [ 'icon'=>'None', 'label'=>$this->defaultOptionText ]; } if ($flagsList) { foreach ($flagsList as $flagCode => $flagName) { $return[$flagCode] = [ 'icon'=>$flagCode, 'label'=>$flagName ]; } } return $return; } } 