core/model/modx/modmanagerresponse.class.php
modManagerResponse
- Package
- modx
\modManagerResponse
Encapsulates an HTTP response from the MODX manager.
Includes functions to manipluate header data, such as status codes, as well as manipulating the response body.
- Parent(s)
- \modResponse
Properties
array
$action= 'array()'
array()
Details- Type
- array
\modContentType
$contentType= 'null'
null
Details- Type
- \modContentType
- Inherited_from
- \modResponse::$$contentType
Methods
__construct(
\modX $modx
)
:
void
Name | Type | Description |
---|---|---|
$modx | \modX | A reference to the modX instance |
addLangTopic(
string $topic
)
:
boolean
Adds a lexicon topic to this page's language topics to load. Will load the topic as well.
Name | Type | Description |
---|---|---|
$topic | string | The topic to load, in standard namespace:topic format |
Type | Description |
---|---|
boolean | True if successful |
checkForMenuPermissions(
string $action
)
:
bool
If this action has a menu item, ensure user has access to menu
Name | Type | Description |
---|---|---|
$action | string |
Type | Description |
---|---|
bool |
checkPreview(
)
:
boolean
Checks to see if the preview parameter is set.
Inherited from: \modResponse::checkPreview()Type | Description |
---|---|
boolean |
getControllerClassName(
)
:
string
Gets the controller class name from the active modAction object
Type | Description |
---|---|
string |
getLangTopics(
)
:
boolean
Adds a lexicon topic to this page's language topics to load
Type | Description |
---|---|
boolean | True if successful |
getNamespacePath(
string $theme
=
'default'
)
:
array
Get the appropriate path to the controllers directory for the active Namespace.
Name | Type | Description |
---|---|---|
$theme | string |
Type | Description |
---|---|
array | An array of paths to the Namespace's controllers directory. |
outputContent(
array $options
=
array()
)
:
void
Overrides modResponse::outputContent to provide mgr-context specific response.
Name | Type | Description |
---|---|---|
$options | array |
sendRedirect(
string $url, array | boolean $options
=
false, string $type
=
'', string $responseCode
=
''
)
:
void | boolean
Sends a redirect to the specified URL using the specified method.
Inherited from: \modResponse::sendRedirect()Valid $type values include: REDIRECT_REFRESH Uses the header refresh method REDIRECT_META Sends a a META HTTP-EQUIV="Refresh" tag to the output REDIRECT_HEADER Uses the header location method
REDIRECT_HEADER is the default.
Name | Type | Description |
---|---|---|
$url | string | The URL to redirect the client browser to. |
$options | array | boolean | An array of options for the redirect OR indicates if redirect attempts should be counted and limited to 3 (latter is deprecated usage; use count_attempts in options array). |
$type | string | The type of redirection to attempt (deprecated, use type in options array). |
$responseCode | string | The type of HTTP response code HEADER to send for the redirect (deprecated, use responseCode in options array) |
Type | Description |
---|---|
void | boolean |