FieldtypePage class

Field that stories references to one or more ProcessWire pages.

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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
FieldtypePage::cleanOrphanedReferences()
NoneFind and clean orphaned references in each of FieldtypePage's tables 
FieldtypePage::exportConfigData(Field $field, array $data)
arrayExport configuration values for external consumption
FieldtypePage::exportValue(Page $page, Field $field, $value)
array stringExport value
FieldtypePage::findReferences(Page $page)
PageArray array intReturn pages referencing the given $page, optionally indexed by field name 
FieldtypePage::formatValue(Page $page, Field $field, $value)
stringFormat the given value for output.
FieldtypePage::getBlankValue(Page $page, Field $field)
Page PageArray boolReturn either a blank Page or a blank PageArray or boolean false (depending on derefAsPage setting) 
FieldtypePage::getCompatibleFieldtypes(Field $field)
FieldtypesFieldtypePage instances are only compatible with other FieldtypePage derived classes.
FieldtypePage::getConfigInputfields(Field $field)
InputfieldWrapperReturn configuration fields definable for each FieldtypePage
FieldtypePage::getDatabaseSchema(Field $field)
arrayReturn the database schema in predefined format 
FieldtypePage::getFieldClass()
stringGet class name to use Field objects of this type (must be class that extends Field class) 
FieldtypePage::getFieldSetups()
arrayGet setup options and setup functions for new fields
FieldtypePage::getInputfield(Page $page, Field $field)
InputfieldPageReturn an InputfieldPage of the type configured 
FieldtypePage::getLoadQueryAutojoin(Field $field, DatabaseQuerySelect $query)
DatabaseQuerySelect nullReturn the query used for Autojoining this field 
FieldtypePage::getMatchQuery($query, string $table, string $subfield, string $operator, string $value)
DatabaseQueryUpdate a DatabaseQuerySelect object to match a Page 
FieldtypePage::getSelectorInfo(Field $field)
arrayReturn array with information about what properties and operators can be used with this field
FieldtypePage::importConfigData(Field $field, array $data)
arrayConvert an array of exported data to a format that will be understood internally
FieldtypePage::importValue(Page $page, Field $field, $value)
PageArrayImport value
FieldtypePage::isEmptyValue(Field $field, $value)
boolReturn whether the given value is considered empty or not. 
FieldtypePage::isValidPage(Page $value, Field $field, Page $forPage)
boolValidate that that $value is a valid Page for this field 
FieldtypePage::markupValue(Page $page, Field $field)
MarkupFieldtype stringRender markup value for field
FieldtypePage::sanitizeValue(Page $page, Field $field, $value)
Page PageArray boolGiven a value of unknown type, return a Page or PageArray (depending on $field->derefAsPage setting) 
FieldtypePage::savePageField(Page $page, Field $field)
boolPer the Fieldtype interface, Save the given Field from the given Page to the database
FieldtypePage::sleepValue(Page $page, Field $field, $value)
arrayGiven an 'awake' value, as set by wakeupValue, convert the value back to a basic type for storage in DB.
FieldtypePage::wakeupValue(Page $page, Field $field, $value)
PageArrayGiven a raw value (value as stored in DB), return the value as it would appear in a Page object

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.251