FieldtypeText class

Basic Field that stores text, typically a single line.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the FieldtypeText class also inherits all the methods and properties of: Fieldtype, WireData and Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
FieldtypeText::formatValue(Page $page, Field $field, string $value)
string

Format value for output

FieldtypeText::getCompatibleFieldtypes(Field $field)
Fieldtypes

Return all Fieldtypes derived from FieldtypeText, which we will consider compatible

FieldtypeText::getConfigInputfields(Field $field)
InputfieldWrapper

Return the fields required to configure an instance of FieldtypeText

FieldtypeText::getDatabaseSchema(Field $field)
array

Return the database schema in specified format

 
FieldtypeText::getInputfield(Page $page, Field $field)
Inputfield

Return the associated Inputfield

 
FieldtypeText::getMatchQuery(PageFinderDatabaseQuerySelect $query, string $table, string $subfield, string $operator, $value)
DatabaseQuerySelect

Update a query to match the text with a fulltext index

 
FieldtypeText::importConfigData(Field $field, array $data)
array

Convert an array of exported data to a format that will be understood internally

FieldtypeText::importValue(Page $page, Field $field, $value)
array string

Import value

FieldtypeText::isEmptyValue(Field $field, mixed $value)
bool

Return whether the given value is considered empty or not

 
FieldtypeText::sanitizeValue(Page $page, Field $field, string $value)
string

Sanitize value for storage

 
FieldtypeText::saveFieldReady(Field $field)
None

Hook called when field is about to be saved

Additional methods and properties

In addition to the methods and properties above, FieldtypeText also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.252