1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-18 12:31:17 +02:00
This commit is contained in:
Ryan Cramer
2021-07-30 14:32:39 -04:00
parent 4d86d4e3f2
commit e1d190eea7

View File

@@ -35,6 +35,20 @@ class FieldtypePageTitle extends FieldtypeText implements FieldtypePageTitleComp
return true; return true;
} }
/**
* Sanitize value for storage
*
* @param Page $page
* @param Field $field
* @param string $value
* @return string
*
*/
public function sanitizeValue(Page $page, Field $field, $value) {
if(is_string($value)) $value = trim($value);
return $value;
}
public function ___getCompatibleFieldtypes(Field $field) { public function ___getCompatibleFieldtypes(Field $field) {
$fieldtypes = $this->wire(new Fieldtypes()); $fieldtypes = $this->wire(new Fieldtypes());
foreach($this->wire('fieldtypes') as $fieldtype) { foreach($this->wire('fieldtypes') as $fieldtype) {