ProcessField class

Add, Edit, and Remove Fields

For more details about how Process modules work, please see: wire/core/Process.php


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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
ProcessField::allowFieldInTemplate(Field $field, Template $template)
bool

For hooks to modify if they want to specific prevent a field from being added to a template from here

ProcessField::execute()
string

Render a list of current fields

ProcessField::executeAdd()
None

Add a new field

ProcessField::executeChangeType()
string

Executed when a field type change is requested and provides an informative confirmation form

ProcessField::executeEdit()
None

Edit an existing Field

ProcessField::executeExport()
string

Execute export

ProcessField::executeImport()
string

Execute import

ProcessField::executeNavJSON()
string array

Output JSON list of navigation items for this (intended to for ajax use)

ProcessField::executeSave()
None

Save the results of a Field Edit

ProcessField::executeSaveChangeType()
None

Save a changed field type

ProcessField::executeSendTemplates()
string

Execute send field to template(s)

ProcessField::executeSendTemplatesSave()
None

Process the form from executeSendTemplates and redirect back to editor

ProcessField::executeTags()
string

Handle the “Manage Tags” actions

 
ProcessField::fieldAdded(Field $field)
None

For hooks to listen to when a new field is added

ProcessField::fieldChangedContext(Field $field, Fieldgroup $fieldgroup, array $changes)
None

Hook called when field context is changed and saved

ProcessField::fieldChangedType(Field $field)
None

For hooks to listen to when a field type changes

ProcessField::fieldDeleted(Field $field)
None

For hooks to listen to when a field is deleted

ProcessField::fieldSaved(Field $field)
None

For hooks to listen to when any field is saved

ProcessField::getAfterLoginUrl(Page $page)
string

URL to redirect to after non-authenticated user is logged-in, or false if module does not support

 
ProcessField::getField()
Field null

Return the current field being edited, or NULL if it hasn't been set

 
ProcessField::getListFilterForm()
InputfieldForm

Renders filtering options when viewing a list of Fields

ProcessField::renderListJSON()
string

Render JSON map of all fields (old method, but should be kept for backwards compatibility)

 
ProcessField::search(string $text)
array

Search for items containing $text and return an array representation of them

 
ProcessField::upgrade($fromVersion, $toVersion)
None

Upgrade module from one version to another

Properties

NameReturnSummary 
ProcessField::listAfterSave bool 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.252