/** * @see \wcf\system\option\TextOptionType::getContent() */ protected function getContent(Option $option, $newValue) { if ($newValue && !preg_match('~^https?://~i', $newValue)) { $newValue = 'http://' . $newValue; } return parent::getContent($option, $newValue); }
/** * @see \wcf\system\option\IOptionType::getData() */ public function getData(Option $option, $newValue) { $newValue = StringUtil::unifyNewlines(parent::getData($option, $newValue)); // check for wildcard if ($option->wildcard) { $values = explode("\n", $newValue); if (in_array($option->wildcard, $values)) { $newValue = $option->wildcard; } } return $newValue; }
/** * @see \wcf\system\option\IOptionType::getFormElement() */ public function getFormElement(Option $option, $value) { $value = FileUtil::formatFileSize($value); return parent::getFormElement($option, $value); }
/** * @see \wcf\system\option\IOptionType::getFormElement() */ public function getFormElement(Option $option, $value) { $value = str_replace('.', WCF::getLanguage()->get('wcf.global.decimalPoint'), $value); return parent::getFormElement($option, $value); }
/** * @see wcf\system\option\IOptionType::getData() */ public function getData(Option $option, $newValue) { return StringUtil::unifyNewlines(parent::getData($option, $newValue)); }