| Allows execution of modules and functions.
More...
List of all members.
|
Public Methods |
| | uri () |
| | functionURI ($function) |
| | title () |
| | setTitle ($title) |
| | singleFunction () |
| | exitStatus () |
| | setExitStatus ($stat) |
| | errorCode () |
| | setErrorCode ($errorCode) |
| | errorModule () |
| | setErrorModule ($moduleName,$viewName) |
| & | handleError ($errorCode,$errorType,$parameters=array()) |
| | redirect ($moduleName,$viewName,$parameters=array(),$unorderedParameters=null) |
| | redirectToView ($viewName= '',$parameters=array(),$unorderedParameters=null) |
| | redirectModule (&$module,$viewName,$parameters=array(),$unorderedParameters=null) |
| | redirectionURI ($moduleName,$viewName,$parameters=array(),$unorderedParameters=null) |
| | redirectionURIForModule (&$module,$viewName,$parameters=array(),$unorderedParameters=null) |
| & | parameters ($viewName= '') |
| & | unorderedParameters ($viewName= '') |
| & | viewData ($viewName= '') |
| | redirectTo ($uri) |
| | redirectURI () |
| | setRedirectURI ($uri) |
| | attributes () |
| | hasAttribute ($attr) |
| & | attribute ($attr) |
| | setCurrentAction ($actionName,$view= '') |
| | currentAction ($view= '') |
| | isCurrentAction ($actionName,$view= '') |
| | addHook ($hookName,$function,$priority=1,$expandParameters=true,$append=false) |
| | runHooks ($hookName,$parameters=null) |
| & | run ($functionName,$parameters,$overrideParameters=false) |
Static Public Methods |
| | currentView () |
| | currentModule () |
| | globalPathList () |
| | setGlobalPathList ($pathList) |
| | addGlobalPathList ($pathList) |
| & | exists ($moduleName,$pathList=null) |
| & | findModule ($moduleName,&$module,$pathList=null) |
Public Attributes |
|
| Functions |
| | \privatesection
|
Private Methods |
| | initialize ($path,$file,$moduleName) |
Detailed Description
Allows execution of modules and functions.
Definition at line ezmodule.php.
Member Function Documentation
| eZModule::addGlobalPathList |
( |
$ |
pathList |
) |
[static] |
|
|
|
Adds the pathlist entries $pathList to the global path list which is used for finding modules. - Parameters:
-
| pathList |
Is either an array with path strings or a single path string |
- See also:
-
setGlobalPathList
Definition at line ezmodule.php.
References globalPathList(). |
| eZModule::addHook |
( |
$ |
hookName, |
|
|
$ |
function, |
|
|
$ |
priority = 1, |
|
|
$ |
expandParameters = true, |
|
|
$ |
append = false |
|
) |
|
|
|
|
Adds an entry to the hook named $hookName. The entry is placed before all other existing entries unless $append is set to true in which case the entry is placed at the end. - Parameters:
-
| function |
Either the name of the function to be run or an array where the first entry is the object and the second is the method name. |
Definition at line ezmodule.php. |
| & eZModule::attribute |
( |
$ |
attr |
) |
|
|
|
|
- Returns:
-
the attribute value for attribute $attr if it is available, otherwise
null.
Definition at line ezmodule.php.
References uri(). |
|
|
- Returns:
-
an array with the available attributes.
Definition at line ezmodule.php. |
| eZModule::currentAction |
( |
$ |
view = '' |
) |
|
|
|
|
- Returns:
-
the current action for the view $view.
If the current action is not yet determined it will use the definitions in module.php for finding out the current action. It first looks trough the single_post_actions array in the selected view mode, the key to each element is the name of the post-variable to match, if it matches the element value is set as the action. 'single_post_actions' => array( 'PreviewButton' => 'Preview',
'PublishButton' => 'Publish' )
If none of these matches it will use the elements from the post_actions array to find a match. It uses the element value for each element to match agains a post-variable, if it is found the contents of the post-variable is set as the action. 'post_actions' => array( 'BrowseActionName' )
- See also:
-
setCurrentAction
Definition at line ezmodule.php.
References eZDebug::writeWarning().
Referenced by isCurrentAction(). |
| eZModule::currentModule |
( |
|
) |
[static] |
|
| eZModule::currentView |
( |
|
) |
[static] |
|
| eZModule::errorModule |
( |
|
) |
|
|
| & eZModule::exists |
( |
$ |
moduleName, |
|
|
$ |
pathList = null |
|
) |
[static] |
|
|
|
Tries to locate the module named $moduleName and returns an eZModule object for it. Returns null if no module can be found.
It uses the globalPathList() to search for modules, use $pathList to add additional path. - Parameters:
-
| moduleName |
The name of the module to find |
| pathList |
Is either an array with path strings or a single path string |
Definition at line ezmodule.php.
References findModule().
Referenced by redirectionURI(). |
|
|
- Returns:
-
the current status from the module.
Definition at line ezmodule.php. |
| & eZModule::findModule |
( |
$ |
moduleName, |
|
|
&$ |
module, |
|
|
$ |
pathList = null |
|
) |
[static] |
|
|
|
Tries to locate the module named $moduleName and sets the $module parameter with the eZModule object, if $module is already a module object it's contents are overwritten. Returns null if no module can be found.
It uses the globalPathList() to search for modules, use $pathList to add additional path. - Parameters:
-
| moduleName |
The name of the module to find |
| pathList |
Is either an array with path strings or a single path string |
Definition at line ezmodule.php.
References globalPathList().
Referenced by handleError(). |
| eZModule::functionURI |
( |
$ |
function |
) |
|
|
|
|
- Returns:
-
the URI to the view $function. If the view is empty or the module is a singleView type it will return the result of uri(). If the view does not exist the
null is returned.
- See also:
-
uri
Definition at line ezmodule.php.
References uri(). |
| eZModule::globalPathList |
( |
|
) |
[static] |
|
| & eZModule::handleError |
( |
$ |
errorCode, |
|
|
$ |
errorType, |
|
|
$ |
parameters = array() |
|
) |
|
|
|
|
Tries to run the error module with the error code $errorCode. Sets the state of the module object to failed and sets the error code.
Definition at line ezmodule.php.
References setExitStatus(). |
| eZModule::hasAttribute |
( |
$ |
attr |
) |
|
|
|
|
- Returns:
-
true if the attribute $attr is available.
Definition at line ezmodule.php. |
| eZModule::initialize |
( |
$ |
path, |
|
|
$ |
file, |
|
|
$ |
moduleName |
|
) |
[private] |
|
|
|
Initializes the module object with the path and file and name. It will look for a file called $file and include the contents of that file, it will then assume that some variables were set which defines the module and it's view/functions.
Definition at line ezmodule.php.
References Functions. |
| eZModule::isCurrentAction |
( |
$ |
actionName, |
|
|
$ |
view = '' |
|
) |
|
|
|
|
- Returns:
-
true if the current action matches the action name $actionName in view $view. Always returns false if either $view or $actionName is empty.
- See also:
-
setCurrentAction
Definition at line ezmodule.php.
References currentView(). |
| & eZModule::parameters |
( |
$ |
viewName = '' |
) |
|
|
| eZModule::redirect |
( |
$ |
moduleName, |
|
|
$ |
viewName, |
|
|
$ |
parameters = array(), |
|
|
$ |
unorderedParameters = null |
|
) |
|
|
|
|
Redirects the page to the module $moduleName and view $viewName with parameters $parameters and unorderedParameters $unorderedParameters. If you already have the module object use redirectModule instead or if you need to redirect to a view in the current module use redirectToView. - Returns:
-
false if the view could not redirected to.
- See also:
-
redirectionURI
Definition at line ezmodule.php.
References eZDebug::writeError().
Referenced by redirectionURIForModule(). |
| eZModule::redirectionURI |
( |
$ |
moduleName, |
|
|
$ |
viewName, |
|
|
$ |
parameters = array(), |
|
|
$ |
unorderedParameters = null |
|
) |
|
|
|
|
- Returns:
-
the URI for the module $moduleName and view $viewName using parameters $parameters and unordered parameters $unorderedParameters.
- See also:
-
redirect
Definition at line ezmodule.php.
References eZDebug::writeError().
Referenced by redirectionURI(). |
| eZModule::redirectionURIForModule |
( |
&$ |
module, |
|
|
$ |
viewName, |
|
|
$ |
parameters = array(), |
|
|
$ |
unorderedParameters = null |
|
) |
|
|
| eZModule::redirectModule |
( |
&$ |
module, |
|
|
$ |
viewName, |
|
|
$ |
parameters = array(), |
|
|
$ |
unorderedParameters = null |
|
) |
|
|
| eZModule::redirectTo |
( |
$ |
uri |
) |
|
|
| eZModule::redirectToView |
( |
$ |
viewName = '', |
|
|
$ |
parameters = array(), |
|
|
$ |
unorderedParameters = null |
|
) |
|
|
| eZModule::redirectURI |
( |
|
) |
|
|
|
|
- Returns:
-
the URI which will be redirected to when the function exits.
Definition at line ezmodule.php. |
| & eZModule::run |
( |
$ |
functionName, |
|
|
$ |
parameters, |
|
|
$ |
overrideParameters = false |
|
) |
|
|
|
|
Tries to run the function $functionName in the current module. - Parameters:
-
| parameters |
An indexed list of parameters, these will be mapped onto real parameter names using the defined parameter names in the module/function definition. If this variable is shorter than the required parameters they will be set to null. |
| overrideParameters |
An associative array of parameters which will override any parameters found using the defined parameters. |
- Returns:
-
null if function could not be run or no return value was found.
Definition at line ezmodule.php.
References eZDebug::writeError(). |
| eZModule::runHooks |
( |
$ |
hookName, |
|
|
$ |
parameters = null |
|
) |
|
|
| eZModule::setCurrentAction |
( |
$ |
actionName, |
|
|
$ |
view = '' |
|
) |
|
|
| eZModule::setErrorCode |
( |
$ |
errorCode |
) |
|
|
|
|
Sets the current error code. - Note:
-
You need to set the exit status to EZ_MODULE_STATUS_FAILED for the error code to be used.
- See also:
-
errorCode
Definition at line ezmodule.php.
References errorCode().
Referenced by handleError(). |
| eZModule::setErrorModule |
( |
$ |
moduleName, |
|
|
$ |
viewName |
|
) |
|
|
| eZModule::setExitStatus |
( |
$ |
stat |
) |
|
|
|
|
Sets the current status for the module to $stat, the status can trigger a redirect or tell the client that the view failed.
Definition at line ezmodule.php.
Referenced by run(). |
| eZModule::setGlobalPathList |
( |
$ |
pathList |
) |
[static] |
|
|
|
Sets the global path list which is used for finding modules. - Parameters:
-
| pathList |
Is either an array with path strings or a single path string |
- See also:
-
addGlobalPathList
Definition at line ezmodule.php.
References globalPathList(). |
| eZModule::setRedirectURI |
( |
$ |
uri |
) |
|
|
|
|
Sets the URI which will be redirected to when the function exits.
Definition at line ezmodule.php.
References uri(). |
| eZModule::setTitle |
( |
$ |
title |
) |
|
|
|
|
Sets the current view for the module to $title.
Definition at line ezmodule.php.
References title(). |
| eZModule::singleFunction |
( |
|
) |
|
|
|
|
- Returns:
-
the title of the current view run, it's normally set by the view and display as the title of view pages.
Definition at line ezmodule.php.
Referenced by setTitle(). |
| & eZModule::unorderedParameters |
( |
$ |
viewName = '' |
) |
|
|
| & eZModule::viewData |
( |
$ |
viewName = '' |
) |
|
|
The documentation for this class was generated from the following file:
|