21 private $selectOptions;
41 array $defaultValue = [],
44 if ($frontendType != self::FRONTEND_WIZARD_MULTISELECT && $frontendType != self::FRONTEND_WIZARD_CHECKBOX) {
45 throw new \InvalidArgumentException(
46 "Frontend input type has to be 'multiselect', 'textarea' or 'checkbox'." 50 throw new \InvalidArgumentException(
'Select options can\'t be empty.');
56 self::VALUE_REQUIRED | self::VALUE_IS_ARRAY,
71 return $this->selectOptions;
83 if (is_array(
$data)) {
86 throw new \InvalidArgumentException(
87 "Value specified for '{$this->getName()}' is not supported: '{$value}'" 92 parent::validate(
$data);
__construct( $name, $frontendType, array $selectOptions, $configPath, $description='', array $defaultValue=[], $shortCut=null)
const FRONTEND_WIZARD_MULTISELECT
const FRONTEND_WIZARD_CHECKBOX
if(!isset($_GET['name'])) $name