Overview

Namespaces

  • None
  • PHP

Classes

  • Breadcrumb
  • Breadcrumbs
  • CacheFile
  • Comment
  • CommentArray
  • CommentFilter
  • CommentForm
  • CommentList
  • Config
  • Database
  • DatabaseQuery
  • DatabaseQuerySelect
  • DatabaseQuerySelectFulltext
  • DatabaseStopwords
  • Debug
  • Field
  • Fieldgroup
  • Fieldgroups
  • FieldgroupsArray
  • Fields
  • FieldsArray
  • Fieldtype
  • FieldtypeMulti
  • Fieldtypes
  • FileLog
  • FilenameArray
  • Fuel
  • HookEvent
  • ImageSizer
  • Inputfield
  • InputfieldsArray
  • InputfieldWrapper
  • Language
  • LanguageParser
  • Languages
  • LanguagesPageFieldValue
  • LanguageSupportInstall
  • LanguageTranslator
  • Markdown_Parser
  • MarkdownExtra_Parser
  • ModuleJS
  • ModulePlaceholder
  • Modules
  • Notice
  • NoticeError
  • NoticeMessage
  • Notices
  • NullPage
  • Page
  • PageArray
  • Pagefile
  • Pagefiles
  • PagefilesManager
  • PageFinder
  • Pageimage
  • Pageimages
  • PagerNav
  • PagerNavItem
  • Pages
  • PagesAccess
  • PagesSortfields
  • PagesType
  • Paths
  • Permission
  • Permissions
  • Process
  • ProcessController
  • ProcessWire
  • Role
  • Roles
  • Sanitizer
  • Selector
  • SelectorBitwiseAnd
  • SelectorContains
  • SelectorContainsLike
  • SelectorContainsWords
  • SelectorEnds
  • SelectorEqual
  • SelectorGreaterThan
  • SelectorGreaterThanEqual
  • SelectorLessThan
  • SelectorLessThanEqual
  • SelectorNotEqual
  • Selectors
  • SelectorStarts
  • Session
  • SessionCSRF
  • SmartyPants_Parser
  • SmartyPantsTypographer_Parser
  • SystemUpdate1
  • Template
  • TemplateFile
  • Templates
  • TemplatesArray
  • Textformatter
  • Textile
  • User
  • Users
  • Wire
  • WireArray
  • WireData
  • WireInput
  • WireInputData
  • WireSaveableItems
  • WireSaveableItemsLookup
  • WireUpload

Interfaces

  • CommentFormInterface
  • CommentListInterface
  • ConfigurableModule
  • FieldtypeLanguageInterface
  • FieldtypePageTitleCompatible
  • HasLookupItems
  • HasRoles
  • InputfieldHasArrayValue
  • Module
  • Saveable
  • TrackChanges

Exceptions

  • ProcessController404Exception
  • ProcessControllerPermissionException
  • Wire404Exception
  • WireDatabaseException
  • WireException
  • WirePermissionException

Functions

  • __
  • _n
  • _x
  • fuel
  • identify_modifier_markdown
  • Markdown
  • mdwp_add_p
  • mdwp_hide_tags
  • mdwp_show_tags
  • mdwp_strip_p
  • ProcessWireClassLoader
  • ProcessWireHostSiteConfig
  • ProcessWireShutdown
  • removeNewlines
  • SmartDashes
  • SmartEllipsis
  • SmartQuotes
  • smarty_modifier_markdown
  • smarty_modifier_smartypants
  • SmartyPants
  • tabIndent
  • unregisterGLOBALS
  • wire
  • wireDecodeJSON
  • wireEncodeJSON
  • wireMkdir
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class ModulePlaceholder

ProcessWire ModulePlaceholder

Holds the place for a Module until it is included and instantiated. As used by the Modules class.

ProcessWire 2.x Copyright (C) 2010 by Ryan Cramer Licensed under GNU/GPL v2, see LICENSE.TXT

http://www.processwire.com http://www.ryancramer.com

Wire implements TrackChanges
Extended by WireData implements IteratorAggregate
Extended by ModulePlaceholder implements Module
Located at core/ModulePlaceholder.php
Methods summary
public
# __construct( )
public static array
# getModuleInfo( )

Return an array of module information

Return an array of module information

Example:

public static function getModuleInfo() { return array( 'title' => 'Your Module's Title', 'version' => 100, 'author' => 'Ryan Cramer', 'summary' => 'Description of what this module does and who made it.', 'href' => 'http://www.domain.com/info/about/this/module/', 'singular' => false, 'autoload' => false, 'requires' => array('HelloWorld', 'LazyCron'), 'installs' => array('Module1', 'Module2', 'Module3'), ); }

The retured array is associative with the following fields. Fields bulleted with a "+" are required and fields bulleted with a "-" are optional, and fields bulleted with a "*" may be optional (see details):

  • title: The module's title.
  • version: an integer that indicates the version number, 101 = 1.0.1
  • summary: a summary of the module (1 sentence to 1 paragraph reommended)
  • href: URL to more information about the module.
  • requires: array of module class names that are required by this module in order to install.

If just one module is required, then it can also be a string with just the module name.

  • installs: array of module class names that this module will handle install/uninstall.

This causes PW's dependency checker to ignore them and it is assumed your module will handle them (optional). If your module does not handle them, PW will automatically install/uninstall them immediately after your module. Like requires, this may be a string if there's only one and must be an array if multiple.

  • singular: is only one instance of this module allowed? return boolean true or false.

If specified, this overrides the isSingular() method, if that method exists in your class. See the information for the isSingular() method for more about the 'singular' property. If you don't provide an isSingular() method, then you should provide this property here.

  • autoload: should this module load automatically at application start? return boolean true or false.

If specified, this overrides the isAutoload() method, if that method exists in your class. See the information for the isAutoload() method for more about the 'autoload' property. If you don't provide an isAutoload() method, then you should provide this property here.

  • permanent: boolean, for core only. True only if the module is permanent and uninstallable.

This is true only of PW core modules, so leave this out elsewhere.

Returns

array

Implementation of

Module::getModuleInfo
public
# init( )

Method to initialize the module.

Method to initialize the module.

While the method is required, if you don't need it, then just leave the implementation blank.

This is called after ProcessWire's API is fully ready for use and hooks. It is called at the end of the bootstrap process. This is before PW has started retrieving or rendering a page. If you need to have the API ready with the $page ready as well, then see the ready() method below this one.

Implementation of

Module::init
public
# ___install( )
public
# ___uninstall( )
public
# setClass( $class )
public mixed|null
# get( string|object $key )

Provides direct reference access to retrieve values in the $data array

Provides direct reference access to retrieve values in the $data array

If the given $key is an object, it will cast it to a string. If the given key is a string with "|" pipe characters in it, it will try all till it finds a value.

Parameters

$key
string|object

Returns

mixed|null
Returns null if the key was not found.
public
# isSingular( )
public
# isAutoload( )
public string
# className( )

Return this object's class name

Return this object's class name

Note that it caches the class name in the $className object property to reduce overhead from calls to get_class().

Returns

string
Methods inherited from WireData
__get(), __isset(), __set(), __unset(), getArray(), getIterator(), has(), isEqual(), remove(), set(), setArray()
Methods inherited from Wire
_(), ___changed(), __call(), __toString(), _n(), _x(), addHook(), addHookAfter(), addHookBefore(), addHookProperty(), error(), fuel(), getAllFuel(), getChanges(), getFuel(), getHooks(), isChanged(), isHooked(), message(), removeHook(), resetTrackChanges(), runHooks(), setFuel(), setTrackChanges(), trackChange(), trackChanges(), untrackChange(), useFuel()
Properties summary
protected string $class ''
#
protected array $moduleInfo array()
#
Properties inherited from WireData
$data
Properties inherited from Wire
$changes, $defaultHookOptions, $fuel, $hookMethodCache, $localHooks, $staticHooks, $trackChanges, $useFuel
ProcessWire API documentation generated by ApiGen 2.6.0