FieldtypePageTable class

Concept by Antti Peisa, Code by Ryan Cramer, Sponsored by Avoine

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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
FieldtypePageTable::exportConfigData(Field $field, array $data)
array

Export configuration values for external consumption

FieldtypePageTable::findOrphans(Page $page, Field $field)
PageArray

Return orphan pages that match the PageTable settings

 
FieldtypePageTable::formatValue(Page $page, Field $field, PageArray $value)
PageArray

Return a formatted PageTable value, which is essentially a new PageArray with hidden items removed

FieldtypePageTable::getBlankValue(Page $page, Field $field)
PageArray

Return a blank value used by a PageTable

 
FieldtypePageTable::getConfigInputfields(PageTableField $field)
InputfieldWrapper

Return configuration fields definable for each FieldtypePage

FieldtypePageTable::getDatabaseSchema(Field $field)
array

Return the database schema used by this Fieldtype

 
FieldtypePageTable::getFieldClass()
string

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

 
FieldtypePageTable::getInputfield(Page $page, PageTableField $field)
Inputfield

Get the Inputfield used for input by PageTable

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

Get the match query for page selection, delegated to FieldtypePage

 
FieldtypePageTable::getModuleInfo()
None 
FieldtypePageTable::getSelectorInfo(Field $field)
array

Get information used by selectors for querying this field

FieldtypePageTable::hookAfterReady(HookEvent $event)
None

Install our ajax lister at ready() time, if the conditions are right

 
FieldtypePageTable::hookPagesCloned(HookEvent $event)
None

Hook called when a page is cloned

 
FieldtypePageTable::hookPagesDelete(HookEvent $event)
None

Hook called when a page is deleted

 
FieldtypePageTable::hookPagesDeleteReady(HookEvent $event)
None

Hook called when a page is about to be deleted

 
FieldtypePageTable::hookPagesPublished(HookEvent $event)
None

Hook called when a page has been published

 
FieldtypePageTable::hookPagesTrashed(HookEvent $event)
None

Hook called when a page has been trashed

 
FieldtypePageTable::hookPagesUnpublished(HookEvent $event)
None

Hook called when a page has been unpublished

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

Convert an array of exported data to a format that will be understood internally (opposite of exportConfigData)

FieldtypePageTable::init()
None

Initialize the PageTable hooks

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

Sanitize a PageTable value

 
FieldtypePageTable::sleepValue(Page $page, PageTableField $field, PageArray $value)
array

Prep a value for storage

FieldtypePageTable::wakeupValue(Page $page, PageTableField $field, array $value)
PageArray

Wake up a stored value

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.253