core/model/modx/processors/element/plugin/getlist.class.php

Show: inherited
Table of Contents

Grabs a list of plugins.

Package
modx  
$start
integer

(optional) The record to start at. Defaults to 0.

$limit
integer

(optional) The number of records to limit to. Defaults to 10.

$sort
string

(optional) The column to sort by. Defaults to name.

$dir
string

(optional) The direction of the sort. Defaults to ASC.

Subpackage
processors.element.plugin  

\modPluginGetListProcessor

Package: modx\processors\element\plugin

Grabs a list of plugins.

{@inheritdoc}

Parent(s)
\modElementGetListProcessor < \modObjectGetListProcessor < \modObjectProcessor < \modProcessor
$start
integer

(optional) The record to start at. Defaults to 0.

$limit
integer

(optional) The number of records to limit to. Defaults to 10.

$sort
string

(optional) The column to sort by. Defaults to name.

$dir
string

(optional) The direction of the sort. Defaults to ASC.

Properties

Propertypublicboolean  $checkListPermission= 'true'
inheritedIf true and object is a modAccessibleObject, will check list permission

Inherited from: \modObjectGetListProcessor::$$checkListPermission\modElementGetListProcessor::$$checkListPermission
Default valuetrueDetails
Type
boolean
Inherited_from
\modObjectGetListProcessor::$$checkListPermission  
Inherited_from
\modElementGetListProcessor::$$checkListPermission  
Propertypublicstring  $classKey= ''modPlugin''

The class key of the Object to iterate
Default value'modPlugin'Details
Type
string
Propertypublicint  $currentIndex= '0'
inheritedThe current index of successful iteration

Inherited from: \modObjectGetListProcessor::$$currentIndex\modElementGetListProcessor::$$currentIndex
Default value0Details
Type
int
Inherited_from
\modObjectGetListProcessor::$$currentIndex  
Inherited_from
\modElementGetListProcessor::$$currentIndex  
Propertypublicstring  $defaultSortDirection= ''ASC''
Default value'ASC'Details
Type
string
Inherited_from
\modObjectGetListProcessor::$$defaultSortDirection  
Inherited_from
\modElementGetListProcessor::$$defaultSortDirection  
Propertypublicstring  $defaultSortField= ''name''
Default value'name'Details
Type
string
Inherited_from
\modObjectGetListProcessor::$$defaultSortField  
Inherited_from
\modElementGetListProcessor::$$defaultSortField  
Propertypublicarray  $languageTopics= 'array('plugin','category')'

An array of language topics to load
Default valuearray('plugin','category')Details
Type
array
Propertypublic\modX  $modx= 'null'
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Inherited_from
\modObjectGetListProcessor::$$modx  
Inherited_from
\modElementGetListProcessor::$$modx  
Propertypublic\xPDOObject|\modAccessibleObject  $object= ''
Propertypublicstring  $objectType= ''object''
inheritedThe object "type", this will be used in various lexicon error strings

Inherited from: \modObjectProcessor::$$objectType\modObjectGetListProcessor::$$objectType\modElementGetListProcessor::$$objectType
Default value'object'Details
Type
string
Inherited_from
\modObjectProcessor::$$objectType  
Inherited_from
\modObjectGetListProcessor::$$objectType  
Inherited_from
\modElementGetListProcessor::$$objectType  
Propertypublicstring  $path= ''''
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Inherited_from
\modObjectGetListProcessor::$$path  
Inherited_from
\modElementGetListProcessor::$$path  
Propertypublicstring  $permission= ''''
Default value''Details
Type
string
Inherited_from
\modObjectProcessor::$$permission  
Inherited_from
\modObjectGetListProcessor::$$permission  
Inherited_from
\modElementGetListProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Inherited_from
\modObjectGetListProcessor::$$primaryKeyField  
Inherited_from
\modElementGetListProcessor::$$primaryKeyField  
Propertypublicarray  $properties= 'array()'
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  
Inherited_from
\modObjectGetListProcessor::$$properties  
Inherited_from
\modElementGetListProcessor::$$properties  

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
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
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
methodpublicafterIteration( array $list ) : array
inherited

Can be used to insert a row after iteration

Inherited from: \modObjectGetListProcessor::afterIteration()\modElementGetListProcessor::afterIteration()
Parameters
Name Type Description
$list array
Returns
Type Description
array
methodpublicbeforeIteration( array $list ) : array
inherited

Can be used to insert a row before iteration

Inherited from: \modObjectGetListProcessor::beforeIteration()\modElementGetListProcessor::beforeIteration()
Parameters
Name Type Description
$list array
Returns
Type Description
array
methodpublicbeforeQuery( ) : boolean
inherited

Allow stoppage of process before the query

Inherited from: \modObjectGetListProcessor::beforeQuery()\modElementGetListProcessor::beforeQuery()
Returns
Type Description
boolean
methodpubliccheckPermissions( ) : boolean
Returns
Type Description
boolean
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicgetData( ) : array
inherited

Get the data of the query

Inherited from: \modObjectGetListProcessor::getData()\modElementGetListProcessor::getData()
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()\modObjectGetListProcessor::getInstance()\modElementGetListProcessor::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

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

Returns
Type Description
array
methodpublicgetProperties( ) : array
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublicgetSortClassKey( ) : string
inherited

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

Inherited from: \modObjectGetListProcessor::getSortClassKey()\modElementGetListProcessor::getSortClassKey()
Returns
Type Description
string
methodpublichasErrors( ) : boolean
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: \modObjectGetListProcessor::initialize()\modElementGetListProcessor::initialize()
Returns
Type Description
boolean
methodpubliciterate( array $data ) : array
inherited

Iterate across the data

Inherited from: \modObjectGetListProcessor::iterate()\modElementGetListProcessor::iterate()
Parameters
Name Type Description
$data array
Returns
Type Description
array
methodpublicoutputArray( array $array, mixed $count = false ) : string

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
inherited

Can be used to prepare the query after the COUNT statement

Inherited from: \modElementGetListProcessor::prepareQueryAfterCount()
Parameters
Name Type Description
$c \xPDOQuery
Returns
Type Description
\xPDOQuery
methodpublicprepareQueryBeforeCount( \xPDOQuery $c ) : \xPDOQuery
inherited

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

Inherited from: \modElementGetListProcessor::prepareQueryBeforeCount()
Parameters
Name Type Description
$c \xPDOQuery
Returns
Type Description
\xPDOQuery
methodpublicprepareRow( \xPDOObject $object ) : array
inherited

Prepare the row for iteration

Inherited from: \modObjectGetListProcessor::prepareRow()\modElementGetListProcessor::prepareRow()
Parameters
Name Type Description
$object \xPDOObject
Returns
Type Description
array
methodpublicprocess( ) : mixed
inherited

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

Inherited from: \modObjectGetListProcessor::process()\modElementGetListProcessor::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()\modObjectGetListProcessor::run()\modElementGetListProcessor::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()\modObjectGetListProcessor::setCheckbox()\modElementGetListProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
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
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
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()\modObjectGetListProcessor::toJSON()\modElementGetListProcessor::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
Parameters
Name Type Description
$key string
Documentation was generated by DocBlox 0.18.1.