Process class

Process modules are self contained applications that run in the ProcessWire admin.

Please be sure to see the Module interface for full details on methods you can specify in a Process module.


There are 36 Process types in the core, plus many more Processs in the modules directory.

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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
breadcrumb(string $href, string $label)
$thisAdd a breadcrumb
browserTitle(string $title)
$thisSet the current browser title tag
execute()
string arrayExecute this Process and return the output. You may have any number of execute[name] methods, triggered by URL segments.
executeNavJSON()
string arrayReturn JSON data of items managed by this Process for use in navigation
executeUnknown()
string arrayCalled when urlSegment matches no execute[Method], only if implemented.
getAfterLoginUrl(Page $page)
bool stringURL to redirect to after non-authenticated user is logged-in, or false if module does not support 
getProcessPage()
Page NullPageReturn the Page that this process lives on 
headline(string $headline)
$thisSet the current primary headline to appear in the admin interface
ready()
None
setConfigData(array $data)
None

Views

Applicable only to Process modules that are using external output/view files.

NameReturnSummary 
getViewFile()
stringIf a view file has been set, this returns the full path to it. 
getViewVars()
arrayGet all variables set for the output view 
setViewFile(string $file)
$thisSet the file to use for the output view, if different from default. 
setViewVars($key)
$thisSet a variable that will be passed to the output view. 

Module interface

See the Module interface for full details on these methods.

For hooks

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

NameReturnSummary 
executed(string $method)
NoneHookable method automatically called after execute() method has finished.
$this->installPage()
PageInstall a dedicated page for this Process module and assign it this Process
$this->uninstallPage()
intUninstall (trash) dedicated pages for this Process module

Additional methods and properties

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

Core Process types

TypeSummary
ProcessCommentsManagerManage comments in your site outside of the page editor.
ProcessFieldEdit individual fields that hold page data
ProcessForgotPasswordProvides password reset/email capability for the Login process.
ProcessHomeActs as a placeholder Process for the admin root. Ensures proper flow control after login.
ProcessListLists the Process assigned to each child page of the current
ProcessLoggerView and manage system logs.
ProcessLoginLogin to ProcessWire
ProcessModuleList, edit or install/uninstall modules
ProcessPageAddAdd a new page
ProcessPageEditEdit a Page
ProcessPageEditImageSelectProvides image manipulation functions for image fields and rich text editors.
ProcessPageEditLinkProvides a link capability as used by some Fieldtype modules (like rich text editors).
ProcessPageListList pages in a hierarchical tree structure
ProcessPageListerAdmin tool for finding and listing pages by any property.
ProcessPageSearchProvides a page search engine for admin use.
ProcessPageSortHandles page sorting and moving for PageList
ProcessPageTrashHandles emptying of Page trash
ProcessPageTypeList, Edit and Add pages of a specific type
ProcessPageViewAll page views are routed through this Process
ProcessPagesExportImportEnables exporting and importing of pages. Development version, not yet recommended for production use.
ProcessPermissionManage system permissions
ProcessProfileEnables user to change their password, email address and other settings that you define.
ProcessRecentPagesShows a list of recently edited pages in your admin.
ProcessRoleManage user roles and what permissions are attached
ProcessTemplateList and edit the templates that control page output
ProcessUserManage system users

See also: Process modules in the modules directory

API reference based on ProcessWire core version 3.0.251