core/model/modx/modmanagerresponse.class.php

Show: inherited
Table of Contents

modManagerResponse

Package
modx  

\modManagerResponse

Package: modx

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

Propertypublicarray  $action= 'array()'

A cached array of the current modAction object
Default valuearray()Details
Type
array
Propertypublicstring  $body= 'null'
inherited

The body of this response

Inherited from: \modResponse::$$body
Default valuenullDetails
Type
string
Inherited_from
\modResponse::$$body  
Propertypublic\modContentType  $contentType= 'null'
inherited

The current content type on the resource

Inherited from: \modResponse::$$contentType
Default valuenullDetails
Type
\modContentType
Inherited_from
\modResponse::$$contentType  
Propertypublicstring  $header= 'null'
inherited

The HTTP header for this Response

Inherited from: \modResponse::$$header
Default valuenullDetails
Type
string
Inherited_from
\modResponse::$$header  
Propertypublic\modX  $modx= 'null'
inherited

A reference to the modX instance

Inherited from: \modResponse::$$modx
Default valuenullDetails
Type
\modX
Inherited_from
\modResponse::$$modx  

Methods

methodpublic__construct( \modX $modx ) : void
inherited

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

A reference to the modX instance

methodpublicaddLangTopic( string $topic ) : boolean

Adds a lexicon topic to this page's language topics to load. Will load the topic as well.

Parameters
Name Type Description
$topic string

The topic to load, in standard namespace:topic format

Returns
Type Description
boolean True if successful
methodpubliccheckForMenuPermissions( string $action ) : bool

If this action has a menu item, ensure user has access to menu

Parameters
Name Type Description
$action string
Returns
Type Description
bool
methodpubliccheckPreview( ) : boolean
inherited

Checks to see if the preview parameter is set.

Inherited from: \modResponse::checkPreview()
Returns
Type Description
boolean
methodpublicgetControllerClassName( ) : string

Gets the controller class name from the active modAction object

Returns
Type Description
string
methodpublicgetLangTopics( ) : boolean

Adds a lexicon topic to this page's language topics to load

Returns
Type Description
boolean True if successful
methodpublicgetNamespacePath( string $theme = 'default' ) : array

Get the appropriate path to the controllers directory for the active Namespace.

Parameters
Name Type Description
$theme string
Returns
Type Description
array An array of paths to the Namespace's controllers directory.
methodpublicoutputContent( array $options = array() ) : void

Overrides modResponse::outputContent to provide mgr-context specific response.

Parameters
Name Type Description
$options array
methodpublicsendRedirect( string $url, array | boolean $options = false, string $type = '', string $responseCode = '' ) : void | boolean
inherited

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.

Parameters
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)

Returns
Type Description
void | boolean
methodpublicsetLangTopics( array $topics = array() ) : boolean

Sets the language topics for this page

Parameters
Name Type Description
$topics array

The array of topics to set

Returns
Type Description
boolean True if successful
Documentation was generated by DocBlox 0.18.1.