core/model/modx/processors/resource/reload.class.php
\modResourceReloadProcessor
save resource form data for reload
{@inheritdoc}
- Parent(s)
- \modProcessor
Properties

array
$properties= 'array()'
The array of properties being passed to this processor
Inherited from: \modProcessor::$$propertiesarray()Details- Type
- array
- Inherited_from
- \modProcessor::$$properties
Methods

__construct(
\modX $modx, array $properties
=
array()
)
:
void
| Name | Type | Description |
|---|---|---|
| $modx | \modX | A reference to the modX instance |
| $properties | array | An array of properties |

_decodeLiterals(
string $string
)
:
stringDecodes strings encoded by _encodeLiterals to restore JavaScript literals.
Inherited from: \modProcessor::_decodeLiterals()| Name | Type | Description |
|---|---|---|
| $string | string | The JSON-encoded string with encoded literals. |
| Type | Description |
|---|---|
| string | The JSON-encoded string with literals restored. |
- Access
- protected

_encodeLiterals(
mixed $value, integer | string $key
)
:
voidEncodes certain JavaScript literal strings for later decoding.
Inherited from: \modProcessor::_encodeLiterals()| 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. |
- Access
- protected

addFieldError(
string $key, string $message
=
''
)
:
mixed
| Name | Type | Description |
|---|---|---|
| $key | string | |
| $message | string |
| Type | Description |
|---|---|
| mixed |

checkPermissions(
)
:
booleanReturn true here to allow access to this processor.
Inherited from: \modProcessor::checkPermissions()| Type | Description |
|---|---|
| boolean |

failure(
string $msg
=
'', mixed $object
=
null
)
:
array | string
| Name | Type | Description |
|---|---|---|
| $msg | string | |
| $object | mixed |
| Type | Description |
|---|---|
| array | string |

getInstance(
\modX $modx, string $className, array $properties
=
array()
)
:
\TheReturn 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()| 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 |
| Type | Description |
|---|---|
| \The | class specified by $className |
- Static

getLanguageTopics(
)
:
arrayLoad 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.
| Type | Description |
|---|---|
| array |

getProperties(
)
:
arrayGet an array of properties for this processor
Inherited from: \modProcessor::getProperties()| Type | Description |
|---|---|
| array |

getProperty(
string $k, mixed $default
=
null
)
:
mixed
| Name | Type | Description |
|---|---|---|
| $k | string | |
| $default | mixed |
| Type | Description |
|---|---|
| mixed |

initialize(
)
:
bool | stringinitialization tasks before processing
| Type | Description |
|---|---|
| bool | string | true to continue with processing, otherwise err msg |

outputArray(
array $array, mixed $count
=
false
)
:
stringReturn 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.
| Name | Type | Description |
|---|---|---|
| $array | array | An array of data objects. |
| $count | mixed | The total number of objects. Used for pagination. |
| Type | Description |
|---|---|
| string | The JSON output. |
- Access
- public

process(
)
:
mixedRun the processor and return the result. Override this in your derivative class to provide custom functionality.
Used here for pre-2.2-style processors.
| Type | Description |
|---|---|
| mixed |

processEventResponse(
array | string $response, string $separator
=
"\n"
)
:
stringProcesses a response from a Plugin Event invocation
Inherited from: \modProcessor::processEventResponse()| Name | Type | Description |
|---|---|---|
| $response | array | string | The response generated by the invokeEvent call |
| $separator | string | The separator for each event response |
| Type | Description |
|---|---|
| string | The processed response. |

run(
)
:
\modProcessorResponseRun the processor, returning a modProcessorResponse object.
Inherited from: \modProcessor::run()| Type | Description |
|---|---|
| \modProcessorResponse |

setCheckbox(
string $k, boolean $force
=
false
)
:
int | nullSpecial 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()| Name | Type | Description |
|---|---|---|
| $k | string | |
| $force | boolean |
| Type | Description |
|---|---|
| int | null |

setDefaultProperties(
array $properties
=
array()
)
:
arraySets default properties that only are set if they don't already exist in the request
Inherited from: \modProcessor::setDefaultProperties()| Name | Type | Description |
|---|---|---|
| $properties | array |
| Type | Description |
|---|---|
| array | The newly merged properties array |

setProperties(
array $properties
)
:
voidSet the runtime properties for the processor
Inherited from: \modProcessor::setProperties()| Name | Type | Description |
|---|---|---|
| $properties | array | The properties, in array and key-value form, to run on this processor |

success(
string $msg
=
'', mixed $object
=
null
)
:
array | string
| Name | Type | Description |
|---|---|---|
| $msg | string | |
| $object | mixed |
| Type | Description |
|---|---|
| array | string |

toJSON(
mixed $data
)
:
stringConverts 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.
| Name | Type | Description |
|---|---|---|
| $data | mixed | The PHP data to be converted. |
| Type | Description |
|---|---|
| string | The extended JSON-encoded string. |
- Access
- public

unsetProperty(
string $key
)
:
voidCompletely unset a property from the properties array
Inherited from: \modProcessor::unsetProperty()| Name | Type | Description |
|---|---|---|
| $key | string |