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()
None

Find and clean orphaned references in each of FieldtypePage's tables

 
FieldtypePage::exportConfigData(Field $field, array $data)
array

Export configuration values for external consumption

FieldtypePage::exportValue(Page $page, Field $field, $value)
array string

Export value

FieldtypePage::findReferences(Page $page)
PageArray array int

Return pages referencing the given $page, optionally indexed by field name

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

Format the given value for output.

FieldtypePage::getBlankValue(Page $page, Field $field)
Page PageArray bool

Return either a blank Page or a blank PageArray or boolean false (depending on derefAsPage setting)

 
FieldtypePage::getCompatibleFieldtypes(Field $field)
Fieldtypes

FieldtypePage instances are only compatible with other FieldtypePage derived classes.

FieldtypePage::getConfigInputfields(Field $field)
InputfieldWrapper

Return configuration fields definable for each FieldtypePage

FieldtypePage::getDatabaseSchema(Field $field)
array

Return the database schema in predefined format

 
FieldtypePage::getFieldClass()
string

Get class name to use Field objects of this type (must be class that extends Field class)

 
FieldtypePage::getFieldSetups()
array

Get setup options and setup functions for new fields

FieldtypePage::getInputfield(Page $page, Field $field)
InputfieldPage

Return an InputfieldPage of the type configured

 
FieldtypePage::getLoadQueryAutojoin(Field $field, DatabaseQuerySelect $query)
DatabaseQuerySelect null

Return the query used for Autojoining this field

 
FieldtypePage::getMatchQuery($query, string $table, string $subfield, string $operator, string $value)
DatabaseQuery

Update a DatabaseQuerySelect object to match a Page

 
FieldtypePage::getSelectorInfo(Field $field)
array

Return array with information about what properties and operators can be used with this field

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

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

FieldtypePage::importValue(Page $page, Field $field, $value)
PageArray

Import value

FieldtypePage::isEmptyValue(Field $field, $value)
bool

Return whether the given value is considered empty or not.

 
FieldtypePage::isValidPage(Page $value, Field $field, Page $forPage)
bool

Validate that that $value is a valid Page for this field

 
FieldtypePage::markupValue(Page $page, Field $field)
MarkupFieldtype string

Render markup value for field

FieldtypePage::sanitizeValue(Page $page, Field $field, $value)
Page PageArray bool

Given a value of unknown type, return a Page or PageArray (depending on $field->derefAsPage setting)

 
FieldtypePage::savePageField(Page $page, Field $field)
bool

Per the Fieldtype interface, Save the given Field from the given Page to the database

FieldtypePage::sleepValue(Page $page, Field $field, $value)
array

Given 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)
PageArray

Given 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.252