ProcessWire API Reference

  • Start typing...

API Variables


Primary

NameSummary
$page Class used by all Page objects in ProcessWire.
$pages The $pages API variable enables loading and manipulation of Page objects, to and from the database.
$modules Loads and manages all modules in ProcessWire.
$user The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.

Input & Output

NameSummary
$input Provides a means to get user input from URLs, GET, POST, and COOKIE variables and more.
$sanitizer Provides methods for sanitizing and validating user input, preparing data for output, and more.
$session Maintains sessions in ProcessWire, authentication, persistent variables, notices and redirects.
$log Enables creation of logs, logging of events, and management of logs.

Users & Access

NameSummary
$user The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.
$users Manages all users (User objects) in ProcessWire.
$permissions Provides management of all Permission pages independent of users, for access control.
$roles Provides management of all Role pages for access control.

Utilities & Helpers

NameSummary
$cache Provides easy, persistent caching of markup, strings, arrays or PageArray objects.
$datetime The $datetime API variable provides helpers for working with dates/times and conversion between formats.
$files Helpers for working with files and directories.
$mail Provides an API interface to email and WireMail.

System

NameSummary
$config Holds ProcessWire configuration settings as defined in /wire/config.php and /site/config.php.
$database All database operations in ProcessWire are performed via this PDO-style database class.
$fields Manages all custom fields in ProcessWire, independently of any Fieldgroup.
$templates Manages and provides access to all the Templates.
$languages API variable $languages enables access to all Language pages and various helper methods.
$classLoader The ProcessWire $classLoader API variable handles autoloading of classes and modules.
$urls Maintains lists of file paths or URLs, primarily used by the ProcessWire $config->paths and $urls API variables.

Functions


View summary of all functions or jump directly to a function by clicking on it below:

Core Classes


Primary

NameSummary
Wire Wire is the base class for most ProcessWire classes and modules.
WireData WireData is the base data-storage class used by many ProcessWire object types and most modules.
WireArray WireArray is the base iterable array type used throughout the ProcessWire framework.

Pages

NameSummary
Page Class used by all Page objects in ProcessWire.
NullPage NullPage is a type of Page object returned by many API methods to indicate a non-match.
User The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.
Role Role is a type of Page used for grouping permissions to users.
Permission Permission is a Page type used for storing an individual permission.

Arrays

NameSummary
WireArray WireArray is the base iterable array type used throughout the ProcessWire framework.
PageArray PageArray is a paginated type of WireArray that holds multiple Page objects.
PaginatedArray PaginatedArray is a type of WireArray that supports pagination of items within it.

Modules

NameSummary
Module Module is the primary PHP interface for module types in ProcessWire.
Fieldtype Fieldtype is a module type used to represent a type of field. All Fieldtype modules descend from this.
Inputfield Inputfield is the base class for modules that collect user input for fields.
Process Process modules are self contained applications that run in the ProcessWire admin.
Textformatter A simple module type that provides formatting of text fields.

Files & Images

NameSummary
Pagefile Represents a single file item attached to a page, typically via a File Fieldtype.
Pagefiles Pagefiles is a type of WireArray that contains Pagefile objects. It also acts as the value for multi-file fields in ProcessWire.
Pageimage Represents an image item attached to a page, typically via an Image Fieldtype.
Pageimages Pageimages are a type of WireArray containing Pageimage objects. They represent the value of multi-image field in ProcessWire.
PagefilesManager Manages files and file directories for a page independent of a particular field.

Fields & Templates

NameSummary
Field Field represents a custom field that is used on a Page.
Fieldgroup Fieldgroup is a type of WireArray that holds a group of Field objects for template(s).
Template Template is a Page’s connection to fields (via a Fieldgroup), access control, and output via a template file.

Pro Modules

NameSummary
FormBuilder Form Builder: Create or edit forms and manage submitted entries.
ProCache ProCache: The ultimate caching and optimization tool for ProcessWire.
FieldtypeRepeaterMatrix ProFields: Repeater Matrix: Commercial Fieldtype module providing multi-type repeaters.

Additional

NameSummary
HookEvent HookEvent is a type provided to hook functions with information about the event.
InputfieldWrapper A type of Inputfield that contains other Inputfield objects as children. Commonly a form or a fieldset.
MarkupPagerNav Pager (Pagination) Navigation: Module for generating pagination markup automatically for paginated WireArray types.
PagesPathFinder Enables finding pages by path, optionally with URL segments, pagination numbers, language prefixes, etc.
PagesType Provides an interface to the Pages class but specific to a given page class/type, with predefined parent and template.
Paths Maintains lists of file paths or URLs, primarily used by the ProcessWire $config->paths and $urls API variables.
ProcessWire Represents an instance of ProcessWire connected with a set of API variables.
Selector Selector maintains a single selector consisting of field name, operator, and value.
Selectors Processes a selector string into a WireArray of Selector objects.
SessionCSRF Provides an API for cross site request forgery protection.
WireDatabaseBackup ProcessWire Database Backup and Restore
WireHttp WireHttp enables you to send HTTP requests to URLs, download files, and more.
WireMail A module type that handles sending of email in ProcessWire
WireRandom Includes methods for random strings, numbers, arrays and passwords.
WireTextTools Specific text and markup tools for ProcessWire $sanitizer and elsewhere.
WireUpload Saves uploads of single or multiple files, saving them to the destination path.

Fieldtypes

NameSummary
FieldtypeCheckbox Checkbox: This Fieldtype stores an ON/OFF toggle via a single checkbox. The ON value is 1 and OFF value is 0.
FieldtypeComments Comments: Field that stores user posted comments for a single Page
FieldtypeDatetime Datetime: Holds date and optionally time values.
FieldtypeEmail E-Mail: Fieldtype for holding an email address.
FieldtypeFieldsetClose Fieldset (Close): Fieldtype to close a FieldsetOpen
FieldtypeFieldsetOpen Fieldset (Open): Open a fieldset to group fields. Should be followed by a Fieldset (Close) after one or more fields.
FieldtypeFieldsetTabOpen Fieldset in Tab (Open): Open a fieldset to group fields. Same as Fieldset (Open) except that it displays in a tab instead.
FieldtypeFile Files: Field that stores one or more files with optional description.
FieldtypeFloat Float: Field that stores a floating point number.
FieldtypeImage Images: Field that stores one or more image files.
FieldtypeInteger Integer: Field that stores an integer value.
FieldtypeLikes Likes: Holds quantity of "likes" for a given page
FieldtypeModule Module Reference: Field that stores reference to another Module.
FieldtypeOptions Select Options: Field that stores single and multi select options.
FieldtypePage Page Reference: Field that stories references to one or more ProcessWire pages.
FieldtypePageTable ProFields: Page Table: Concept by Antti Peisa, Code by Ryan Cramer, Sponsored by Avoine
FieldtypePageTitle Page Title: Field that holds a Page title
FieldtypePassword Password: Fieldtype for holding a hashed and salted password
FieldtypeRepeater Repeater: Maintains a collection of fields that are repeated for any number of times.
FieldtypeRepeaterMatrix ProFields: Repeater Matrix: Commercial Fieldtype module providing multi-type repeaters.
FieldtypeTable ProFields: Table: Field that lets you define a database table of custom fields.
FieldtypeText Text: Basic Field that stores text, typically a single line.
FieldtypeTextarea Textarea: Field that stores multiple lines of text
FieldtypeToggle Toggle (Yes/No): Configurable yes/no, on/off toggle alternative to a checkbox, plus optional "other" option.
FieldtypeURL URL: Stores a valid URL value, whether local/relative or a URL that includes a protocol.
FieldtypeVerifiedURL ProFields: Verified URL: and re-verifies it over time at set intervals.

AltStyle によって変換されたページ (->オリジナル) /