Predefined module types in ProcessWire

This page looks at the different predefined types of modules in ProcessWire and what they do. It also provides the recommended naming prefixes for modules so that ProcessWire can recognize your module type without actually loading it.

ProcessWire comes with a base Module interface for implementing any kind of plugin, as well as a few abstract and base objects for predefined module types that can be extended to create a module of that type. Common examples of predefined module types in ProcessWire include:

  • Fieldtype for defining field types.
  • Inputfield for defining types of form input fields.
  • Process for creating admin processes/applications.
  • Textformatter for formatting text.
  • AdminTheme for creating themes in the admin.
  • WireMail for modules that send email and extend the WireMail class.
  • Tfa for implementing a specific kind of two-factor authentication.
  • ImageSizerEngine for modules that extend ImageSizerEngine for resizing images.
  • FileCompiler for modules that extend FileCompilerModule for compilation of files.
  • FileValidator for modules that extend FileValidatorModule for validation of files.

Naming conventions

When creating new modules that fall in this category of predefined types, the module type must be used as a prefix in the class name, as a means of identification. For instance, if you create a new Textformatter module called "Something" you should name it "TextformatterSomething". Likewise, a new Inputfield module called "SuperCheckbox" should be named "InputfieldSuperCheckbox". For the module types mentioned above, ProcessWire will not recognize them as a module of that type unless they contain the correct prefix. For modules that aren't based on these existing types, you don't need to consider naming conventions. However, we recommend the following:

  • Use the prefix Markup for modules that are used primarily for markup generation.
  • Use the prefix Session for modules that focus primarily on sessions.
  • Use the prefix Jquery (case intended) for modules that represent a jQuery plugin.
  • Use the prefix LanguageSupport for modules that provide multi-language features and don't match an existing predefined type.

Outside of these module types and naming conventions, you are welcome to use whatever name you'd like when developing a module.

Twitter updates

  • New post: This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— More
    6 September 2019
  • We added WebP image support this year and many have been adopting it in existing projects. We look at a process used for migrating existing websites to WebP images— from preliminary considerations to implementation & testing, w/lots of tips & tricks too: More
    16 August 2019
  • Core version 3.0.137 on the dev branch adds the ability to hook multiple methods at once, in a single call. This post details how it works and provides a useful example of how you might put it to use in your development environment— More
    2 August 2019

Latest news

  • ProcessWire Weekly #279
    This week in the 279th issue of ProcessWire Weekly we're going to introduce some of the latest third party modules out there, and highlight a brand new site of the week. Read on!
    Weekly.pw / 14 September 2019
  • ProcessWire 3.0.140 and FormBuilder v40
    This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140.
    Blog / 6 September 2019
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits