public function __construct() { $config = ['values' => ['ICON' => Image::SIZE_ICON, 'SMALL' => Image::SIZE_SMALL, 'MEDIUM' => Image::SIZE_MEDIUM, 'ORIGINAL' => Image::SIZE_ORIGINAL]]; parent::__construct($config); }
public function __construct() { $config = ['name' => 'ContentFormatEnum', 'values' => [self::FORMAT_TEXT, self::FORMAT_HTML]]; parent::__construct($config); }
public function __construct() { // Option #2: Define enum type using inheritance $config = ['values' => ['ICON' => Image::SIZE_ICON, 'SMALL' => Image::SIZE_SMALL, 'MEDIUM' => Image::SIZE_MEDIUM, 'ORIGINAL' => Image::SIZE_ORIGINAL]]; parent::__construct($config); }