<?php
 namespace App\Form\Input; class CustomerFlag extends \Engine\Form\Input\Flag { protected function determinePossibleValues() :array { $flagsList = \App\Config\CustomersFlags::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; } } 