core/model/modx/modprocessor.class.php

Show: inherited
Table of Contents

modProcessor

Package
modx  

\modDeprecatedProcessor

Package: modx

A utility class for pre-2.2-style, or flat file, processors.

{@inheritdoc}

Parent(s)
\modProcessor

Properties

Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modProcessor::checkPermissions()
Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean
inherited

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Inherited from: \modProcessor::initialize()
Returns
Type Description
boolean
methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Rather than load a class for processing, include the processor file directly.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modDriverSpecificProcessor

Package: modx

A utility class used for defining driver-specific processors

{@inheritdoc}

Parent(s)
\modProcessor
Children
\modDatabaseTableTruncateProcessor
\modDatabaseTableOptimizeProcessor
\modDatabaseTableGetListProcessor
\modDatabaseTableOptimizeDatabaseProcessor

Properties

Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modProcessor::checkPermissions()
Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
static

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean
inherited

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Inherited from: \modProcessor::initialize()
Returns
Type Description
boolean
methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed
abstractinherited

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Inherited from: \modProcessor::process()

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectCreateProcessor

Package: Default

A utility abstract class for defining create-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modResourceCreateProcessor
\modUserCreateProcessor
\modAccessPolicyTemplateCreateProcessor
\modAccessPolicyCreateProcessor
\modUserGroupCreateProcessor
\modFormCustomizationSetCreateProcessor
\modFormCustomizationProfileCreateProcessor
\modUserGroupRoleCreateProcessor
\modSystemSettingsCreateProcessor
\modContentTypeCreateProcessor
\modActionCreateProcessor
\modDashboardWidgetCreateProcessor
\modDashboardCreateProcessor
\modContextCreateProcessor
\modSourceCreateProcessor
\modNamespaceCreateProcessor
\modProviderCreateProcessor
\modPropertySetCreateProcessor
\modElementCreateProcessor
\modElementCategoryCreateProcessor
Abstract
 

Properties

Propertypublicstring  $afterSaveEvent= ''''

The name of the event to fire after saving
Default value''Details
Type
string
Propertypublicstring  $beforeSaveEvent= ''''

The name of the event to fire before saving
Default value''Details
Type
string
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterSave( ) : boolean

Override in your derivative class to do functionality before save() is run

Returns
Type Description
boolean
methodpublicbeforeSave( ) : boolean

Override in your derivative class to do functionality after save() is run

Returns
Type Description
boolean
methodpublicbeforeSet( ) : boolean

Override in your derivative class to do functionality before the fields are set on the object

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : array

Return the success message

Returns
Type Description
array
methodpublicdoesAlreadyExist( array $criteria ) : int

Parameters
Name Type Description
$criteria array
Returns
Type Description
int
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicfireAfterSaveEvent( ) : void

Fire the after save event

methodpublicfireBeforeSaveEvent( ) : boolean

Fire before save event. Return true to prevent saving.

Returns
Type Description
boolean
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log the removal manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Process the Object create processor Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectDuplicateProcessor

Package: Default

A utility abstract class for defining duplicate-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modAccessPolicyTemplateDuplicateProcessor
\modAccessPolicyDuplicateProcessor
\modFormCustomizationSetDuplicateProcessor
\modFormCustomizationProfileDuplicateProcessor
\modDashboardDuplicateProcessor
\modContextDuplicateProcessor
\modSourceDuplicateProcessor
\modElementDuplicateProcessor
Abstract
 

Properties

Propertypublicboolean  $checkSavePermission= 'true'

Whether or not to check the save permission on modAccessibleObjects
Default valuetrueDetails
Type
boolean
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic  $nameField= ''name''
Default value'name'Details
Type
n/a
Propertypublic\xPDOObject  $newObject= ''

The newly duplicated object
Details
Type
\xPDOObject
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterSave( ) : boolean

Run any logic after the object has been duplicated

Returns
Type Description
boolean
methodpublicalreadyExists( string $name ) : boolean

Check to see if an object already exists with that name

Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicbeforeSave( ) : boolean

Run any logic before the object has been duplicated. May return false to prevent duplication.

Returns
Type Description
boolean
methodpublicbeforeSet( ) : boolean

Override in your derivative class to do functionality before the fields are set on the object

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : array

Cleanup and return a response.

Returns
Type Description
array
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetNewName( ) : string

Get the new name for the duplicate

Returns
Type Description
string
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log a manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetNewName( string $name ) : string

Set the new name to the new object

Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectExportProcessor

Package: Default

Utility class for exporting an object

{@inheritdoc}

Parent(s)
\modObjectGetProcessor < \modObjectProcessor < \modProcessor
Children
\modAccessPolicyTemplateExportProcessor
\modAccessPolicyExportProcessor
Abstract
 

Properties

Propertypublicboolean  $checkViewPermission= 'true'
inherited

If set to true, will check the view permission on modAccessibleObjectsInherited from: \modObjectGetProcessor::$$checkViewPermission
Default valuetrueDetails
Type
boolean
Inherited_from
\modObjectGetProcessor::$$checkViewPermission  
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey\modObjectGetProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Inherited_from
\modObjectGetProcessor::$$classKey  
Propertypublicstring  $downloadProperty= ''download''

Default value'download'Details
Type
string
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics\modObjectGetProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Inherited_from
\modObjectGetProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx\modObjectGetProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Inherited_from
\modObjectGetProcessor::$$modx  
Propertypublicstring  $nameField= ''name''

Default value'name'Details
Type
string
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object\modObjectGetProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType\modObjectGetProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Inherited_from
\modObjectGetProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path\modObjectGetProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Inherited_from
\modObjectGetProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission\modObjectGetProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Inherited_from
\modObjectGetProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField\modObjectGetProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Inherited_from
\modObjectGetProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties\modObjectGetProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  
Inherited_from
\modObjectGetProcessor::$$properties  
Propertypublic\XMLWriter  $xml= ''

Details
Type
\XMLWriter

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()\modObjectGetProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()\modObjectGetProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicbeforeOutput( ) : void
inherited

Used for adding custom data in derivative types

Inherited from: \modObjectGetProcessor::beforeOutput()
methodpubliccache( ) : array | string

Cache the data to an export file

Returns
Type Description
array | string
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()\modObjectGetProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : array

Return the response

Returns
Type Description
array
methodpublicdownload( ) : mixed

Attempt to download the exported file to the browser

Returns
Type Description
mixed
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()\modObjectGetProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()\modObjectGetProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()\modObjectGetProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()\modObjectGetProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()\modObjectGetProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean
inherited

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Inherited from: \modObjectGetProcessor::initialize()
Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log the export manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()\modObjectGetProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprepareXml( ) : void
abstract

Must be declared in your derivative class. Used to prepare the data to export.

Details
Abstract
 
methodpublicprocess( ) : mixed
inherited

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Inherited from: \modObjectGetProcessor::process()

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()\modObjectGetProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()\modObjectGetProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()\modObjectGetProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()\modObjectGetProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()\modObjectGetProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()\modObjectGetProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()\modObjectGetProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectGetListProcessor

Package: Default

A utility abstract class for defining getlist-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modResourceGetListProcessor
\modResourceSearchProcessor
\modUserUserGroupGetListProcessor
\modUserGetListProcessor
\modUserMessageGetListProcessor
\modAccessPermissionGetListProcessor
\modAccessPolicyTemplateGroupGetListProcessor
\modAccessPolicyTemplateGetListProcessor
\modAccessPolicyGetListProcessor
\modResourceGroupGetListProcessor
\modUserGroupUserGetListProcessor
\modUserGroupGetListProcessor
\modFormCustomizationSetGetListProcessor
\modFormCustomizationProfileGetListProcessor
\modUserGroupRoleGetListProcessor
\modSystemSettingsGetListProcessor
\modContentTypeGetListProcessor
\modActiveResourceListProcessor
\modActionGetListProcessor
\modDashboardWidgetGetListProcessor
\modDashboardGetListProcessor
\modClassMapGetListProcessor
\modContextGetListProcessor
\modMediaSourceGetListProcessor
\modNamespaceGetListProcessor
\modProviderGetListProcessor
\modPackageGetListProcessor
\modPackageVersionGetListProcessor
\modElementGetListProcessor
\modElementCategoryGetListProcessor
Abstract
 

Properties

Propertypublicboolean  $checkListPermission= 'true'

If true and object is a modAccessibleObject, will check list permission
Default valuetrueDetails
Type
boolean
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicint  $currentIndex= '0'

The current index of successful iteration
Default value0Details
Type
int
Propertypublicstring  $defaultSortDirection= ''ASC''

The default direction to sort
Default value'ASC'Details
Type
string
Propertypublicstring  $defaultSortField= ''name''

The default field to sort by
Default value'name'Details
Type
string
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterIteration( array $list ) : array

Can be used to insert a row after iteration

Parameters
Name Type Description
$list array
Returns
Type Description
array
methodpublicbeforeIteration( array $list ) : array

Can be used to insert a row before iteration

Parameters
Name Type Description
$list array
Returns
Type Description
array
methodpublicbeforeQuery( ) : boolean

Allow stoppage of process before the query

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetData( ) : array

Get the data of the query

Returns
Type Description
array
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublicgetSortClassKey( ) : string

Can be used to provide a custom sorting class key for the default sorting columns

Returns
Type Description
string
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliciterate( array $data ) : array

Iterate across the data

Parameters
Name Type Description
$data array
Returns
Type Description
array
methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprepareQueryAfterCount( \xPDOQuery $c ) : \xPDOQuery

Can be used to prepare the query after the COUNT statement

Parameters
Name Type Description
$c \xPDOQuery
Returns
Type Description
\xPDOQuery
methodpublicprepareQueryBeforeCount( \xPDOQuery $c ) : \xPDOQuery

Can be used to adjust the query prior to the COUNT statement

Parameters
Name Type Description
$c \xPDOQuery
Returns
Type Description
\xPDOQuery
methodpublicprepareRow( \xPDOObject $object ) : array

Prepare the row for iteration

Parameters
Name Type Description
$object \xPDOObject
Returns
Type Description
array
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectGetProcessor

Package: Default

A utility abstract class for defining get-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modObjectExportProcessor
\modResourceGetProcessor
\modUserGetProcessor
\modUserGroupRoleGetProcessor
\modActionGetProcessor
\modContextGetProcessor
\modPackageGetProcessor
\modElementCategoryGetProcessor
\modElementGetProcessor
Abstract
 

Properties

Propertypublicboolean  $checkViewPermission= 'true'

If set to true, will check the view permission on modAccessibleObjects
Default valuetrueDetails
Type
boolean
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicbeforeOutput( ) : void

Used for adding custom data in derivative types

methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : array

Return the response

Returns
Type Description
array
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectImportProcessor

Package: Default

Utility class for importing an object

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modAccessPolicyImportProcessor
\modAccessPolicyTemplateImportProcessor
Abstract
 

Properties

Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicstring  $fileProperty= ''file''

The property that contains the file data
Default value'file'Details
Type
string
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublicstring  $nameField= ''name''

The name, or unique, field for the object
Default value'name'Details
Type
string
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  
Propertypublicboolean  $setName= 'true'

Whether or not to attempt to set the name field
Default valuetrueDetails
Type
boolean
Propertypublicstring  $xml= ''''

The parsed XML from the file
Default value''Details
Type
string

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterSave( ) : boolean

Do any after save logic

Returns
Type Description
boolean
methodpublicalreadyExists( string $name ) : bool

Check to see if the object already exists with this name field

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicbeforeSave( ) : boolean

Do any before save logic

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log the export manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectProcessor

Package: Default

Base class for object-specific processors

{@inheritdoc}

Parent(s)
\modProcessor
Children
\modObjectGetProcessor
\modObjectGetListProcessor
\modObjectCreateProcessor
\modObjectUpdateProcessor
\modObjectDuplicateProcessor
\modObjectRemoveProcessor
\modObjectImportProcessor
\modAccessPolicyRemoveMultipleProcessor
\modAccessPolicyTemplateRemoveMultipleProcessor
\modPluginEventGetListProcessor
Abstract
 

Properties

Propertypublicstring  $classKey= ''

The class key of the Object to iterate
Details
Type
string
Propertypublicarray  $languageTopics= 'array()'

An array of language topics to load
Default valuearray()Details
Type
array
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''

The object being grabbed
Propertypublicstring  $objectType= ''object''

The object "type", this will be used in various lexicon error strings
Default value'object'Details
Type
string
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Propertypublicstring  $permission= ''''

The Permission to use when checking against
Default value''Details
Type
string
Propertypublicstring  $primaryKeyField= ''id''

The primary key field to grab the object by
Default value'id'Details
Type
string
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpubliccheckPermissions( ) : boolean

Return true here to allow access to this processor.

Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array

Load a collection of Language Topics for this processor.

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean
inherited

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Inherited from: \modProcessor::initialize()
Returns
Type Description
boolean
methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed
abstractinherited

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Inherited from: \modProcessor::process()

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectRemoveProcessor

Package: Default

A utility abstract class for defining remove-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modUserDeleteProcessor
\modAccessPolicyRemoveProcessor
\modAccessPolicyTemplateRemoveProcessor
\modUserGroupRemoveProcessor
\modFormCustomizationSetRemoveProcessor
\modFormCustomizationProfileRemoveProcessor
\modUserGroupRoleRemoveProcessor
\modSystemSettingsRemoveProcessor
\modContentTypeRemoveProcessor
\modActionRemoveProcessor
\modDashboardRemoveProcessor
\modDashboardWidgetRemoveProcessor
\modContextRemoveProcessor
\modSourceRemoveProcessor
\modNamespaceRemoveProcessor
\modProviderRemoveProcessor
\modElementRemoveProcessor
\modElementCategoryRemoveProcessor
Abstract
 

Properties

Propertypublicstring  $afterRemoveEvent= ''''

The name of the event to fire after removal
Default value''Details
Type
string
Propertypublicstring  $beforeRemoveEvent= ''''

The name of the event to fire before removal
Default value''Details
Type
string
Propertypublicboolean  $checkRemovePermission= 'true'

If set to true, will check the remove permission on modAccessibleObjects
Default valuetrueDetails
Type
boolean
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterRemove( ) : bool

Can contain post-removal logic.

Returns
Type Description
bool
methodpublicbeforeRemove( ) : boolean

Can contain pre-removal logic; return false to prevent remove.

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : void

After removal, manager action log, and event firing logic

methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicfireAfterRemoveEvent( ) : void

If specified, fire the after remove event

methodpublicfireBeforeRemoveEvent( ) : boolean

If specified, fire the before remove event

Returns
Type Description
boolean Return false to allow removal; non-empty to prevent it
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log the removal manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modObjectUpdateProcessor

Package: Default

A utility abstract class for defining update-based processors

{@inheritdoc}

Parent(s)
\modObjectProcessor < \modProcessor
Children
\modResourceUpdateProcessor
\modUserUpdateProcessor
\modAccessPolicyTemplateUpdateProcessor
\modAccessPolicyUpdateProcessor
\modUserGroupUpdateProcessor
\modFormCustomizationSetUpdateProcessor
\modFormCustomizationProfileUpdateProcessor
\modUserGroupRoleUpdateProcessor
\modSystemSettingsUpdateProcessor
\modContentTypeUpdateProcessor
\modActionUpdateProcessor
\modDashboardWidgetUpdateProcessor
\modDashboardUpdateProcessor
\modContextUpdateProcessor
\modSourceUpdateProcessor
\modNamespaceUpdateProcessor
\modProviderUpdateProcessor
\modPropertySetUpdateProcessor
\modElementCategoryUpdateProcessor
\modPluginDeactivateProcessor
\modPluginActivateProcessor
\modElementUpdateProcessor
Abstract
 

Properties

Propertypublicstring  $afterSaveEvent= ''''

The name of the event to fire after saving
Default value''Details
Type
string
Propertypublicstring  $beforeSaveEvent= ''''

The name of the event to fire before saving
Default value''Details
Type
string
Propertypublic  $checkSavePermission= 'true'
Default valuetrueDetails
Type
n/a
Propertypublicstring  $classKey= ''
inherited

The class key of the Object to iterateInherited from: \modObjectProcessor::$$classKey
Details
Type
string
Inherited_from
\modObjectProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array()'
inherited

An array of language topics to loadInherited from: \modObjectProcessor::$$languageTopics
Default valuearray()Details
Type
array
Inherited_from
\modObjectProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX object.

Inherited from: \modProcessor::$$modx\modObjectProcessor::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
inherited

The object being grabbedInherited from: \modObjectProcessor::$$object
Propertypublicstring  $objectType= ''object''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modObjectProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Propertypublicstring  $path= ''''
inherited

The absolute path to this processor

Inherited from: \modProcessor::$$path\modObjectProcessor::$$path
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Propertypublicstring  $permission= ''''
inherited

The Permission to use when checking againstInherited from: \modObjectProcessor::$$permission
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
inherited

The primary key field to grab the object byInherited from: \modObjectProcessor::$$primaryKeyField
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
inherited

The array of properties being passed to this processor

Inherited from: \modProcessor::$$properties\modObjectProcessor::$$properties
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
inherited

Creates a modProcessor object.

Inherited from: \modProcessor::__construct()\modObjectProcessor::__construct()
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
inherited

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Inherited from: \modProcessor::_decodeLiterals()\modObjectProcessor::_decodeLiterals()
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
inherited

Encodes certain JavaScript literal strings for later decoding.

Inherited from: \modProcessor::_encodeLiterals()\modObjectProcessor::_encodeLiterals()
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
inherited

Add an error to the field

Inherited from: \modProcessor::addFieldError()\modObjectProcessor::addFieldError()
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterSave( ) : boolean

Override in your derivative class to do functionality after save() is run

Returns
Type Description
boolean
methodpublicbeforeSave( ) : boolean

Override in your derivative class to do functionality before save() is run

Returns
Type Description
boolean
methodpublicbeforeSet( ) : boolean

Override in your derivative class to do functionality before the fields are set on the object

Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
inherited

Return true here to allow access to this processor.

Inherited from: \modObjectProcessor::checkPermissions()
Returns
Type Description
boolean
methodpubliccleanup( ) : array

Return the success message

Returns
Type Description
array
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
inherited

Return a failure message from the processor.

Inherited from: \modProcessor::failure()\modObjectProcessor::failure()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicfireAfterSaveEvent( ) : void

Fire the after save event

methodpublicfireBeforeSaveEvent( ) : boolean

Fire before save event. Return true to prevent saving.

Returns
Type Description
boolean
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
staticinherited

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Inherited from: \modProcessor::getInstance()\modObjectProcessor::getInstance()
Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array
inherited

Load a collection of Language Topics for this processor.

Inherited from: \modObjectProcessor::getLanguageTopics()

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
inherited

Get an array of properties for this processor

Inherited from: \modProcessor::getProperties()\modObjectProcessor::getProperties()
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
inherited

Get a specific property.

Inherited from: \modProcessor::getProperty()\modObjectProcessor::getProperty()
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
inherited

Return whether or not the processor has errors

Inherited from: \modProcessor::hasErrors()\modObjectProcessor::hasErrors()
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpubliclogManagerAction( ) : void

Log the removal manager action

methodpublicoutputArray( array $array, mixed $count = false ) : string
inherited

Return arrays of objects (with count) converted to JSON.

Inherited from: \modProcessor::outputArray()\modObjectProcessor::outputArray()

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
inherited

Processes a response from a Plugin Event invocation

Inherited from: \modProcessor::processEventResponse()\modObjectProcessor::processEventResponse()
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsaveObject( ) : boolean

Abstract the saving of the object out to allow for transient and non-persistent object updating in derivative classes

Returns
Type Description
boolean
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
inherited

Sets default properties that only are set if they don't already exist in the request

Inherited from: \modProcessor::setDefaultProperties()\modObjectProcessor::setDefaultProperties()
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
inherited

Set the path of the processor

Inherited from: \modProcessor::setPath()\modObjectProcessor::setPath()
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void
inherited

Set the runtime properties for the processor

Inherited from: \modProcessor::setProperties()\modObjectProcessor::setProperties()
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
inherited

Set a property value

Inherited from: \modProcessor::setProperty()\modObjectProcessor::setProperty()
Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
inherited

Return a success message from the processor.

Inherited from: \modProcessor::success()\modObjectProcessor::success()
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
inherited

Completely unset a property from the properties array

Inherited from: \modProcessor::unsetProperty()\modObjectProcessor::unsetProperty()
Parameters
Name Type Description
$key string

\modProcessor

Package: modx

Abstracts a MODX processor, handling its response and error formatting.

{@inheritdoc}

Children
\modDeprecatedProcessor
\modDriverSpecificProcessor
\modObjectProcessor
\modResourceEventGetListProcessor
\modResourceEventUpdateFromGrid
\modResourceReloadProcessor
\modResourceUnPublishProcessor
\modResourceEmptyRecycleBinProcessor
\modResourcePublishProcessor
\modResourceGroupResourceGetListProcessor
\modResourceUnDeleteProcessor
\modResourceGetNodesProcessor
\modResourceLocksReleaseProcessor
\modResourceLocksStealProcessor
\modResourceGetToolbarProcessor
\modResourceDuplicateProcessor
\modResourceDataProcessor
\modResourceDeleteProcessor
\modResourceSortProcessor
\modUserDeactivateMultipleProcessor
\modUserActivateMultipleProcessor
\modFlushPermissionsProcessor
\modResourceGroupRemoveProcessor
\modResourceGroupRemoveResourceProcessor
\modResourceGroupGetNodesProcessor
\modResourceGroupCreateProcessor
\modResourceGroupUpdateProcessor
\modSecurityFlushProcessor
\modUserGroupUserRemoveProcessor
\modSecurityGroupUserCreateProcessor
\modUserGroupUserUpdateProcessor
\modSecurityGroupGetNodesProcessor
\modUserGroupSortProcessor
\modFormCustomizationSetRemoveMultipleProcessor
\modFormCustomizationProfileRemoveMultipleProcessor
\modProfileChangePasswordProcessor
\modProfileGetProcessor
\modProfileUpdateProcessor
\modSystemEventGetListProcessor
\modSystemPhpThumbProcessor
\modSystemSettingsGetAreasProcessor
\modSystemRemoveLocksProcessor
\modSystemPhpInfoProcessor
\modSystemLanguageGetListProcessor
\modContentTypeUpdateFromGridProcessor
\modSystemDownloadOutputProcessor
\modSystemRteGetListProcessor
\modCountryGetListProcessor
\modCharsetGetListProcessor
\modSystemDerivativesGetListProcessor
\modSystemClearCacheProcessor
\modSystemInfoProcessor
\modActionGetNodesProcessor
\modActionSortProcessor
\modConsoleProcessor
\modDashboardRemoveMultipleProcessor
\modDashboardWidgetRemoveMultipleProcessor
\modSystemLogTruncateProcessor
\modSystemLogGetListProcessor
\modSystemErrorLogClearProcessor
\modSystemErrorLogDownloadProcessor
\modSystemErrorLogGetProcessor
\modContextUpdateFromGridProcessor
\modBrowserFileRemoveProcessor
\modBrowserFileUploadProcessor
\modBrowserFileRenameProcessor
\modBrowserFileDownloadProcessor
\modBrowserFileCreateProcessor
\modBrowserFileGetProcessor
\modBrowserFileUpdateProcessor
\modBrowserFolderRemoveProcessor
\modBrowserFolderRenameProcessor
\modBrowserFolderChmodProcessor
\modBrowserFolderGetListProcessor
\modBrowserFolderCreateProcessor
\modBrowserFolderGetFilesProcessor
\modBrowserFolderUpdateProcessor
\modBrowserFolderSortProcessor
\modSourceRemoveMultipleProcessor
\modMediaSourceTypeGetListProcessor
\modNamespaceRemoveMultipleProcessor
\modProviderGetProcessor
\modLexiconReloadFromBaseProcessor
\modLexiconEntryRevertProcessor
\modLexiconGetListProcessor
\modLexiconEntryUpdateFromGridProcessor
\modLexiconEntryCreateProcessor
\modLexiconTopicGetListProcessor
\modPackageRemoveProcessor
\modPackageViewProcessor
\modPackageInstallProcessor
\modPackageGetAttributeProcessor
\modPackageVersionRemoveProcessor
\modPackageCheckForUpdatesProcessor
\modPackageGetNodesProcessor
\modPackageRemoteGetListProcessor
\modPackageGetInfoProcessor
\modPackageDownloadProcessor
\modPackageUpdateProcessor
\modPackageScanLocalProcessor
\modPackageUninstallProcessor
\modElementGetClassesProcessor
\modElementExportPropertiesProcessor
\modElementGetNodesProcessor
\modElementImportPropertiesProcessor
\modElementTvResourceGroupGetListProcessor
\modElementTvTemplateGetList
\modElementTvTemplateUpdateFromGrid
\modElementTvRendersGetInputsProcessor
\modTvRendersGetPropertiesProcessor
\modElementGetInsertProperties
\modElementGetListByClass
\modElementSortProcessor

Properties

Propertypublic\modX  $modx= 'null'

A reference to the modX object.

Default valuenullDetails
Type
\modX
Propertypublicstring  $path= ''''

The absolute path to this processor

Default value''Details
Type
string
Propertypublicarray  $properties= 'array()'

The array of properties being passed to this processor

Default valuearray()Details
Type
array

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void

Creates a modProcessor object.

Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string

Decodes strings encoded by _encodeLiterals to restore JavaScript literals.

Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void

Encodes certain JavaScript literal strings for later decoding.

Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed

Add an error to the field

Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpubliccheckPermissions( ) : boolean

Return true here to allow access to this processor.

Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string

Return a failure message from the processor.

Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetInstance( \modX $modx, string $className, array $properties = array() ) : \The
static

Return the proper instance of the derived class. This can be used to override how MODX loads a processor class; for example, when handling derivative classes with class_key settings.

Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$className string

The name of the class that is being requested.

$properties array

An array of properties being run with the processor

Returns
Type Description
\The class specified by $className
Details
Static
 
methodpublicgetLanguageTopics( ) : array

Load a collection of Language Topics for this processor.

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array

Get an array of properties for this processor

Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed

Get a specific property.

Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean

Return whether or not the processor has errors

Returns
Type Description
boolean
methodpublicinitialize( ) : boolean

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean
methodpublicoutputArray( array $array, mixed $count = false ) : string

Return arrays of objects (with count) converted to JSON.

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed
abstract

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string

Processes a response from a Plugin Event invocation

Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse

Run the processor, returning a modProcessorResponse object.

Returns
Type Description
\modProcessorResponse
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array

Sets default properties that only are set if they don't already exist in the request

Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void

Set the path of the processor

Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProperties( array $properties ) : void

Set the runtime properties for the processor

Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void

Set a property value

Parameters
Name Type Description
$k string
$v mixed
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string

Return a success message from the processor.

Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string

Converts PHP to JSON with JavaScript literals left in-tact.

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void

Completely unset a property from the properties array

Parameters
Name Type Description
$key string

\modProcessorResponse

Package: modx

Response class for Processor executions

Constants

Constant  ERROR_GENERAL = 'error_general'

When there is only a general error

Const
ERROR_GENERAL  
Constant  ERROR_FIELD = 'error_field'

When there are only field-specific errors

Const
ERROR_FIELD  
Constant  ERROR_BOTH = 'error_both'

When there is both field-specific and general errors

Const
ERROR_BOTH  
Constant  ERROR_TYPE = 'error_type'

The field for the error type

Const
ERROR_TYPE  

Properties

Propertypublicstring  $error_type= ''''

The error type for this response
Default value''Details
Type
string
Propertypublicarray  $errors= 'array()'

A collection of modProcessorResponseError objects for each field-specific error
Default valuearray()Details
Type
array
Propertypublic\modX  $modx= 'null'

A reference to the modX object
Default valuenullDetails
Type
\modX
Propertypublicarray  $response= 'null'

A reference to the full response
Default valuenullDetails
Type
array

Methods

methodpublic__construct( \modX $modx, array $response = array() ) : void

The constructor for modProcessorResponse

Parameters
Name Type Description
$modx \modX

A reference to the modX object.

$response array

The array response from the modX.runProcessor method

methodpublicgetAllErrors( string $fieldErrorSeparator = ': ' ) : array

Gets all errors and adds them all into an array.

Parameters
Name Type Description
$fieldErrorSeparator string

The separator to use between fieldkey and message for field-specific errors.

Returns
Type Description
array An array of all errors.
methodpublicgetErrorType( ) : string

Returns the type of error for this response

Returns
Type Description
string The type of error returned
methodpublicgetFieldErrors( ) : array

An array of modProcessorResponseError objects for each field-specific error

Returns
Type Description
array
methodpublicgetMessage( ) : string

Gets the general status message for the response.

Returns
Type Description
string The status message
methodpublicgetObject( ) : array

Returns the array object, if is sent in the response

Returns
Type Description
array The object in the response, usually the object being performed on.
methodpublicgetResponse( ) : array

Returns the entire response object in array form

Returns
Type Description
array The array response
methodpublichasFieldErrors( ) : boolean

Checks to see if there are any field-specific errors in this response

Returns
Type Description
boolean True if there were field-specific errors
methodpublichasMessage( ) : boolean

Returns true if there is a general status message for the response.

Returns
Type Description
boolean True if there is a general message
methodpublichasObject( ) : boolean

Returns true if an object was sent with this response.

Returns
Type Description
boolean True if an object was sent.
methodpublicisError( ) : \Returns

Checks to see if the response is an error

Returns
Type Description
\Returns true if the response was a success, otherwise false

\modProcessorResponseError

Package: modx

An abstraction class of field-specific errors for a processor response

Properties

Propertypublicarray  $error= 'null'

The error data itself
Default valuenullDetails
Type
array
Propertypublicstring  $field= 'null'

The field key that the error occurred on
Default valuenullDetails
Type
string
Propertypublicstring  $message= ''''

The message that was sent for the field error
Default value''Details
Type
string

Methods

methodpublic__construct( array $error = array() ) : void

The constructor for the modProcessorResponseError class

Parameters
Name Type Description
$error array

An array error response

methodpublicgetError( ) : array

Returns the array data for the field-specific error

Returns
Type Description
array
methodpublicgetField( ) : string

Returns the field key for the field-specific error

Returns
Type Description
string
methodpublicgetMessage( ) : string

Returns the message for the field-specific error

Returns
Type Description
string
Documentation was generated by DocBlox 0.18.1.