core/model/modx/processors/element/tv/renders/getinputproperties.class.php
Grabs a list of input properties for a TV type
- Package
- modx
- $context
- string
(optional) The context by which to grab renders from. Defaults to executing context.
- $type
- string
(optional) The type of render to grab properties for. Defaults to default.
- $tv
- integer
(optional) The TV to prefill property values from.
- Subpackage
- processors.element.tv.renders
\TvInputPropertiesManagerController
Faux controller class for rendering TV input properties
- Parent(s)
- \modManagerController
Properties

array
$config= 'array()'
array()Details- Type
- array
- Inherited_from
- \modManagerController::$$config

string
$content= ''''
''Details- Type
- string
- Inherited_from
- \modManagerController::$$content

array
$controllersPaths= ''
- Type
- array
- Inherited_from
- \modManagerController::$$controllersPaths

\modMediaSource
$defaultSource= ''
- Type
- \modMediaSource
- Inherited_from
- \modManagerController::$$defaultSource

string
$failureMessage= ''''
''Details- Type
- string
- Inherited_from
- \modManagerController::$$failureMessage

array
$head= 'array('css' => array(),'js' => array(),'html' => array(),'lastjs' => array())'
array('css' => array(),'js' => array(),'html' => array(),'lastjs' => array())Details- Type
- array
- Inherited_from
- \modManagerController::$$head

bool
$isFailure= 'false'
falseDetails- Type
- bool
- Inherited_from
- \modManagerController::$$isFailure

bool
$loadBaseJavascript= 'true'
trueDetails- Type
- bool
- Inherited_from
- \modManagerController::$$loadBaseJavascript

bool
$loadFooter= 'false'
falseDetails- Type
- bool

bool
$loadHeader= 'false'
falseDetails- Type
- bool

\modX
$modx= ''
- Type
- \modX
- Inherited_from
- \modManagerController::$$modx

array
$placeholders= 'array()'
array()Details- Type
- array
- Inherited_from
- \modManagerController::$$placeholders

string
$ruleOutput= 'array()'
array()Details- Type
- string
- Inherited_from
- \modManagerController::$$ruleOutput

array
$scriptProperties= 'array()'
array()Details- Type
- array
- Inherited_from
- \modManagerController::$$scriptProperties

array
$templatesPaths= 'array()'
array()Details- Type
- array
- Inherited_from
- \modManagerController::$$templatesPaths

string
$theme= ''default''
'default'Details- Type
- string
- Inherited_from
- \modManagerController::$$theme

string
$title= ''''
''Details- Type
- string
- Inherited_from
- \modManagerController::$$title

\modContext
$workingContext= ''
- Type
- \modContext
- Inherited_from
- \modManagerController::$$workingContext
Methods

__construct(
\modX $modx, array $config
=
array()
)
:
voidThe constructor for the modManaagerController class.
Inherited from: \modManagerController::__construct()| Name | Type | Description |
|---|---|---|
| $modx | \modX | A reference to the modX object. |
| $config | array | A configuration array of options related to this controller's action object. |

_postfixVersionToScript(
string $str, string $version
)
:
stringAppends a version postfix to a script tag
Inherited from: \modManagerController::_postfixVersionToScript()| Name | Type | Description |
|---|---|---|
| $str | string | The script tag to append the version to |
| $version | string | The version to append |
| Type | Description |
|---|---|
| string | The adjusted script tag |
- Access
- private

_prepareHead(
)
:
voidPrepare the set html/css/js to be added
Inherited from: \modManagerController::_prepareHead()
_prepareVersionPostfix(
)
:
stringGrabs a stripped version of modx to prevent caching of JS after upgrades
Inherited from: \modManagerController::_prepareVersionPostfix()| Type | Description |
|---|---|
| string | The parsed version string |
- Access
- private

addCss(
string $script
)
:
voidAdd a external CSS file to the head of the page
Inherited from: \modManagerController::addCss()| Name | Type | Description |
|---|---|---|
| $script | string |

addHtml(
string $script
)
:
voidAdd a block of HTML to the head of the page
Inherited from: \modManagerController::addHtml()| Name | Type | Description |
|---|---|---|
| $script | string |

addJavascript(
string $script
)
:
voidAdd an external Javascript file to the head of the page
Inherited from: \modManagerController::addJavascript()| Name | Type | Description |
|---|---|---|
| $script | string |

addLastJavascript(
string $script
)
:
voidAdd an external Javascript file to the head of the page
Inherited from: \modManagerController::addLastJavascript()| Name | Type | Description |
|---|---|---|
| $script | string |

addLexiconTopic(
string $topic
)
:
stringAdds a topic to the JS language array
Inherited from: \modManagerController::addLexiconTopic()| Name | Type | Description |
|---|---|---|
| $topic | string |
| Type | Description |
|---|---|
| string |

checkFormCustomizationRules(
\xPDOObject $obj
=
null, bool $forParent
=
false
)
:
boolChecks Form Customization rules for an object.
Inherited from: \modManagerController::checkFormCustomizationRules()| Name | Type | Description |
|---|---|---|
| $obj | \xPDOObject | If passed, will validate against for rules with constraints. |
| $forParent | bool |
| Type | Description |
|---|---|
| bool |

checkPermissions(
)
:
booleanDo permission checking in this method. Returning false will present a "permission denied" message.
| Type | Description |
|---|---|
| boolean |

failure(
string $message
)
:
voidSet a failure on this controller. This will return the error message.
Inherited from: \modManagerController::failure()| Name | Type | Description |
|---|---|---|
| $message | string |

fetchTemplate(
string $tpl
)
:
string
| Name | Type | Description |
|---|---|---|
| $tpl | string | The path to the template |
| Type | Description |
|---|---|
| string | The output of the template |

firePostRenderEvents(
)
:
voidCan be used to fire events after all the CSS/JS is loaded for a page
Inherited from: \modManagerController::firePostRenderEvents()
firePreRenderEvents(
)
:
voidFire any pre-render events for the controller
Inherited from: \modManagerController::firePreRenderEvents()
getControllersPaths(
bool $coreOnly
=
false
)
:
arrayGet the path to this controller's directory. Override this to point to a custom directory.
Inherited from: \modManagerController::getControllersPaths()| Name | Type | Description |
|---|---|---|
| $coreOnly | bool | Ensure that it grabs the path from the core namespace only. |
| Type | Description |
|---|---|
| array |

getInstance(
\modX $modx, string $className, array $config
=
array()
)
:
\TheReturn the proper instance of the derived class. This can be used to override how the manager loads a controller class; for example, when handling derivative classes with class_key settings.
Inherited from: \modManagerController::getInstance()| Name | Type | Description |
|---|---|---|
| $modx | \modX | A reference to the modX object. |
| $className | string | The name of the class that is being requested. |
| $config | array | A configuration array of options related to this controller's action object. |
| Type | Description |
|---|---|
| \The | class specified by $className |
- Static

getLanguageTopics(
)
:
arraySpecify an array of language topics to load for this controller
| Type | Description |
|---|---|
| array |

getPageTitle(
)
:
stringReturn a string to set as the controller's page title.
| Type | Description |
|---|---|
| string |

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

getTemplateFile(
)
:
stringReturn the relative path to the template file to load
| Type | Description |
|---|---|
| string |

getTemplatesPaths(
bool $coreOnly
=
false
)
:
array | stringGet an array of possible paths to this controller's template's directory.
Inherited from: \modManagerController::getTemplatesPaths()Override this to point to a custom directory.
| Name | Type | Description |
|---|---|---|
| $coreOnly | bool | Ensure that it grabs the path from the core namespace only. |
| Type | Description |
|---|---|
| array | string |

initialize(
)
:
voidCan be used to provide custom methods prior to processing
Inherited from: \modManagerController::initialize()
loadController(
$controller, bool $coreOnly
=
false
)
:
mixed | stringLoad another manual controller file (such as header/footer)
Inherited from: \modManagerController::loadController()| Name | Type | Description |
|---|---|---|
| $controller | ||
| $coreOnly | bool |
| Type | Description |
|---|---|
| mixed | string |

loadControllersPath(
)
:
arrayLoad an array of possible paths to this controller's directory. Only override this if you want to override default behavior; otherwise, overriding getControllersPath is preferred.
Inherited from: \modManagerController::loadControllersPath()| Type | Description |
|---|---|
| array |

loadTemplatesPath(
)
:
stringLoad the path to this controller's template's directory. Only override this if you want to override default behavior; otherwise, overriding getTemplatesPath is preferred.
Inherited from: \modManagerController::loadTemplatesPath()| Type | Description |
|---|---|
| string |

loadWorkingContext(
)
:
\modContext | stringLoad the working context for this controller.
Inherited from: \modManagerController::loadWorkingContext()| Type | Description |
|---|---|
| \modContext | string |

prepareLanguage(
)
:
voidPrepares the language placeholders
Inherited from: \modManagerController::prepareLanguage()
process(
array $scriptProperties
=
array()
)
:
mixedProcess the controller, returning an array of placeholders to set.
| Name | Type | Description |
|---|---|---|
| $scriptProperties | array | A array of REQUEST parameters. |
| Type | Description |
|---|---|
| mixed | Either an error or output string, or an array of placeholders to set. |

registerBaseScripts(
)
:
voidRegisters the core and base JS scripts
Inherited from: \modManagerController::registerBaseScripts()- Access
- public

registerCssJs(
)
:
voidRegisters CSS/JS to manager interface
Inherited from: \modManagerController::registerCssJs()
setPlaceholder(
string $k, mixed $v
)
:
voidSet a placeholder for this controller's template
Inherited from: \modManagerController::setPlaceholder()| Name | Type | Description |
|---|---|---|
| $k | string | The key of the placeholder |
| $v | mixed | The value of the placeholder |

setProperties(
array $properties
)
:
voidSets the properties array for this controller
Inherited from: \modManagerController::setProperties()| Name | Type | Description |
|---|---|---|
| $properties | array |

setProperty(
string $key, mixed $value
)
:
void
| Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |

setTemplatePaths(
array $paths
)
:
voidSet the possible template paths for this controller
Inherited from: \modManagerController::setTemplatePaths()| Name | Type | Description |
|---|---|---|
| $paths | array |
\modTvRendersGetPropertiesProcessor
Grabs a list of input properties for a TV type
{@inheritdoc}
- Parent(s)
- \modProcessor
- $context
- string
(optional) The context by which to grab renders from. Defaults to executing context.
- $type
- string
(optional) The type of render to grab properties for. Defaults to default.
- $tv
- integer
(optional) The TV to prefill property values from.
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.
| Type | Description |
|---|---|
| boolean |

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

getInputProperties(
)
:
arrayGet default display properties for specific tv
| Type | Description |
|---|---|
| array |

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.
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 |

getRenderOutput(
array $renderDirectories
)
:
mixed | stringGet the properties render output when given an array of directories to search
| Name | Type | Description |
|---|---|---|
| $renderDirectories | array |
| Type | Description |
|---|---|
| mixed | string |

initialize(
)
:
booleanCan 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.
| Type | Description |
|---|---|
| boolean |

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. |

renderController(
)
:
stringSimulate controller with the faux controller class
| Type | Description |
|---|---|
| string |

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 |