*/
protected function getTypeObject($type) {
if (!isset($this->typeObjects[$type])) {
- $className = 'wcf\system\option\OptionType'.ucfirst($type);
+ $className = 'wcf\system\option\\'.StringUtil::firstCharToLowerCase($type).'OptionType';
// validate class
if (!class_exists($className)) {
*/
protected function getTypeObject($type) {
if (!isset($this->typeObjects[$type])) {
- $className = 'wcf\system\option\group\GroupOptionType'.ucfirst($type);
+ $className = 'wcf\system\option\group\\'.StringUtil::toUpperCase($type).'GroupOptionType';
// create instance
if (!class_exists($className)) {
}
/**
- * @see wcf\system\option\SearchableOptionType::getSearchFormElement()
+ * @see wcf\system\option\ISearchableOptionType::getSearchFormElement()
*/
protected function getFormElement($type, Option $option) {
return $this->getTypeObject($type)->getSearchFormElement($option);
}
/**
- * @see wcf\system\option\SearchableOptionType::getSearchFormElement()
+ * @see wcf\system\option\ISearchableOptionType::getSearchFormElement()
*/
protected function getFormElement($type, &$optionData) {
return $this->getTypeObject($type)->getSearchFormElement($optionData);
*/
protected function getTypeObject($type) {
if (!isset($this->typeObjects[$type])) {
- $className = 'wcf\system\option\group\GroupOptionType'.ucfirst($type);
+ $className = 'wcf\system\option\group\\'.StringUtil::toUpperCase($type).'GroupOptionType';
// validate class
if (!class_exists($className)) {
if (isset($option['options'])) $options = $option['options'];
// check if optionType exists
- $className = 'wcf\system\option\group\GroupOptionType'.ucfirst($optionType);
+ $className = 'wcf\system\option\group\\'.StringUtil::toUpperCase($type).'GroupOptionType';
if (!class_exists($className)) {
throw new SystemException("unable to find class '".$className."'");
}
if (isset($option['options'])) $options = $option['options'];
// check if optionType exists
- $className = 'wcf\system\option\OptionType'.ucfirst($optionType);
+ $className = 'wcf\system\option\\'.StringUtil::firstCharToUpperCase($optionType).'OptionType';
if (!class_exists($className)) {
throw new SystemException("unable to find class '".$className."'");
}
// check if optionType exists
- $className = 'wcf\system\option\OptionType'.ucfirst($optionType);
+ $className = 'wcf\system\option\\'.StringUtil::firstCharToUpperCase($optionType).'OptionType';
if (!class_exists($className)) {
throw new SystemException("unable to find class '".$className."'");
}