InputfieldPage class

Select one or more 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 InputfieldPage class also inherits all the methods and properties of: Inputfield, WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
addClass($class)
InputfieldPage InputfieldAdd a CSS class name (extends Inputfield::addClass) 
addable int bool 
allowUnpub int bool 
createFindPagesSelector()
string arrayCreate a page finding selector from all configured properties 
derefAsPage int 
findPagesCode(Page $page)
PageArray
Can also be used as property: findPagesCode
findPagesSelect string Same as findPageSelector, but configured interactively with InputfieldSelector . 
findPagesSelector string 
getConfigInputfields()
InputfieldWrapperGet field configuration Inputfields
getFieldSetups()
arrayGet recommended setups for FieldtypePage/InputfieldPage 
getInputfield()
Inputfield nullGet delegate Inputfield for page selection 
getInputfieldOptions()
arrayGet options available for page selection Inputfields 
getPageLabel(Page $page)
stringGet a label for the given page 
getSelectablePages(Page $page)
PageArray nullReturn PageArray of selectable pages for this input
getSetting($key)
mixedGets a setting (or API variable) from the Inputfield, while ignoring attributes. 
getTemplateIDs()
array stringReturn array or string of configured template IDs 
has($key)
boolDoes this Inputfield have the requested property or attribute? 
inputfield string Inputfield class used for input 
inputfieldClass string Public property alias of protected getInputfieldClass() method 
inputfieldClasses array 
isEmpty()
boolDoes this Inputfield have an empty value? 
isValidPage(Page $page, $field)
boolIs the given $page valid for the given $field? 
labelFieldFormat string Formatting string for $page->getMarkup() as alternative to $labelFieldName 
labelFieldName string Field name to use for label (note: this will be "." if $labelFieldFormat is in use). 
parent_id int 
processInput(WireInputData $input)
this InputfieldProcess input
processInputAddPages(WireInputData $input)
(nothing)
render()
stringRender
renderAddable()
string
renderReady()
boolCalled before render() 
renderValue()
stringRender non-editable value
setAttribute($key, $value)
InputfieldPage InputfieldSet an input attribute 
template_id int 
template_ids array 

For hooks

These methods are only useful for hooking and should not be called directly.

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.244

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer