|
eZ Publish
[4.2]
|
Allows execution of modules and functions. More...
Public Member Functions | |
| actionParameter ($parameterName, $view= '') | |
| addHook ($hookName, $function, $priority=1, $expandParameters=true, $append=false) | |
| attribute ($attr) | |
| attributes () | |
| currentAction ($view= '') | |
| currentRedirectionURI () | |
| errorCode () | |
| errorModule () | |
| exitStatus () | |
| eZModule ($path, $file, $moduleName, $checkFileExistence=true) | |
| forward ($module, $functionName, $parameters=false) | |
| functionURI ($function) | |
| getNamedParameters () | |
| handleError ($errorCode, $errorType=false, $parameters=array(), $userParameters=false) | |
| hasActionParameter ($parameterName, $view= '') | |
| hasAttribute ($attr) | |
| hasViewResult ($view= '') | |
| isCurrentAction ($actionName, $view= '') | |
| parameters ($viewName= '') | |
| redirect ($moduleName, $viewName, $parameters=array(), $unorderedParameters=null, $userParameters=false, $anchor=false) | |
| redirectCurrent () | |
| redirectionURI ($moduleName, $viewName, $parameters=array(), $unorderedParameters=null, $userParameters=false, $anchor=false) | |
| redirectionURIForModule ($module, $viewName, $parameters=array(), $unorderedParameters=null, $userParameters=false, $anchor=false) | |
| redirectModule ($module, $viewName, $parameters=array(), $unorderedParameters=null, $userParameters=false, $anchor=false) | |
| redirectStatus () | |
| redirectTo ($uri) | |
| redirectToView ($viewName= '', $parameters=array(), $unorderedParameters=null, $userParameters=false, $anchor=false) | |
| redirectURI () | |
| run ($functionName, $parameters=array(), $overrideParameters=false, $userParameters=false) | |
| runHooks ($hookName, $parameters=null) | |
| setActionParameter ($parameterName, $parameterValue, $view= '') | |
| setCurrentAction ($actionName, $view= '') | |
| setCurrentName ($name) | |
| setCurrentView ($name) | |
| setErrorCode ($errorCode) | |
| setErrorModule ($moduleName, $viewName) | |
| setExitStatus ($stat) | |
| setRedirectStatus ($status) | |
| setRedirectURI ($uri) | |
| setTitle ($title) | |
| setUIComponentName ($component) | |
| setUIContextName ($context) | |
| setViewResult ($result, $view= '') | |
| singleFunction () | |
| title () | |
| uiComponentName () | |
| uiContextName () | |
| unorderedParameters ($viewName= '') | |
| uri () | |
| viewData ($viewName= '') | |
| viewResult ($view= '') | |
Static Public Member Functions | |
| static | activeModuleRepositories ($useExtensions=true) |
| static | addGlobalPathList ($pathList) |
| currentModule () | |
| currentView () | |
| static | exists ($moduleName, $pathList=null, $showError=false) |
| static | findModule ($moduleName, $module=null, $pathList=null, $showError=false) |
| static | globalPathList () |
| static | setGlobalPathList ($pathList) |
Public Attributes | |
| $ErrorCode | |
| $ExitStatus | |
| $Functions | |
| $HookList | |
| $Module | |
| $Name | |
| $NamedParameters | |
| $OriginalParameters | |
| $OriginalUnorderedParameters | |
| $OriginalViewParameters | |
| $Path | |
| $RedirectStatus | |
| $RedirectURI | |
| $Title | |
| $UIComponent | |
| The current UI context, by default the current module but can be changed depending on module or PHP code. | |
| $UIComponentMatch | |
| Controls at which level UI component matching is done, either 'module' which uses module name or 'view' which uses view name. | |
| $UIContext | |
| The current UI context, by default 'navigation' but can be changed depending on module or PHP code. | |
| $UserParameters | |
| $ViewActions | |
| $ViewParameters | |
| $ViewResult | |
| const | HOOK_STATUS_CANCEL_RUN = 1 |
| const | HOOK_STATUS_FAILED = 2 |
| const | HOOK_STATUS_OK = 0 |
| const | STATUS_FAILED = 2 |
| const | STATUS_IDLE = 0 |
| const | STATUS_OK = 1 |
| const | STATUS_REDIRECT = 3 |
| const | STATUS_RERUN = 4 |
Private Member Functions | |
| initialize ($path, $file, $moduleName, $checkFileExistence=true) | |
Allows execution of modules and functions.
Definition at line 38 of file ezmodule.php.
| eZModule::actionParameter | ( | $ | parameterName, |
| $ | view = '' |
||
| ) |
Definition at line 751 of file ezmodule.php.
| static eZModule::activeModuleRepositories | ( | $ | useExtensions = true | ) | [static] |
Definition at line 1284 of file ezmodule.php.
Referenced by eZScript\initialize(), and eZSiteAccess\reInitialise().
| static eZModule::addGlobalPathList | ( | $ | pathList | ) | [static] |
Adds the pathlist entries $pathList to the global path list which is used for finding modules.
| $pathList | Is either an array with path strings or a single path string |
Definition at line 1349 of file ezmodule.php.
| 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.
| $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 853 of file ezmodule.php.
| eZModule::attribute | ( | $ | attr | ) |
null. Definition at line 612 of file ezmodule.php.
| eZModule::attributes | ( | ) |
Definition at line 589 of file ezmodule.php.
Referenced by hasAttribute().
| eZModule::currentAction | ( | $ | 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' )
Definition at line 675 of file ezmodule.php.
Referenced by actionParameter(), hasActionParameter(), and isCurrentAction().
| eZModule::currentModule | ( | ) | [static] |
false if no module is active. Definition at line 1259 of file ezmodule.php.
| eZModule::currentRedirectionURI | ( | ) |
Definition at line 399 of file ezmodule.php.
Referenced by redirectCurrent().
| eZModule::currentView | ( | ) | [static] |
false if no view is active. Definition at line 1246 of file ezmodule.php.
Referenced by actionParameter(), currentAction(), currentRedirectionURI(), forward(), hasActionParameter(), hasViewResult(), isCurrentAction(), parameters(), redirectionURIForModule(), setActionParameter(), setCurrentAction(), setViewResult(), unorderedParameters(), viewData(), and viewResult().
| eZModule::errorCode | ( | ) |
0 if no error code. Definition at line 259 of file ezmodule.php.
| eZModule::errorModule | ( | ) |
Definition at line 279 of file ezmodule.php.
Referenced by handleError().
| static eZModule::exists | ( | $ | moduleName, |
| $ | pathList = null, |
||
| $ | showError = false |
||
| ) | [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.
| $moduleName | The name of the module to find |
| $pathList | Is either an array with path strings or a single path string |
| $showError | If true an error will be shown if the module it not found. |
Definition at line 1373 of file ezmodule.php.
Referenced by eZPolicyLimitation\allValuesAsArrayWithNames(), eZUser\generateAccessArray(), redirect(), redirectionURI(), and eZURLAliasML\urlToAction().
| eZModule::exitStatus | ( | ) |
Definition at line 241 of file ezmodule.php.
Referenced by handleError().
| eZModule::eZModule | ( | $ | path, |
| $ | file, | ||
| $ | moduleName, | ||
| $ | checkFileExistence = true |
||
| ) |
Definition at line 50 of file ezmodule.php.
Referenced by findModule().
| static eZModule::findModule | ( | $ | moduleName, |
| $ | module = null, |
||
| $ | pathList = null, |
||
| $ | showError = false |
||
| ) | [static] |
Tries to locate the module named $moduleName, sets the $module parameter with the eZModule object and returns the eZModule object. If $module is already a module object its 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.
| $moduleName | The name of the module to find |
| $module | |
| $pathList | Is either an array with path strings or a single path string |
| $showError | If true an error will be shown if the module it not found. |
Definition at line 1392 of file ezmodule.php.
Referenced by exists(), and handleError().
| eZModule::forward | ( | $ | module, |
| $ | functionName, | ||
| $ | parameters = false |
||
| ) |
Definition at line 1000 of file ezmodule.php.
| eZModule::functionURI | ( | $ | function | ) |
null is returned. Definition at line 146 of file ezmodule.php.
| eZModule::getNamedParameters | ( | ) |
Definition at line 1448 of file ezmodule.php.
| static eZModule::globalPathList | ( | ) | [static] |
null if no list is available. Definition at line 1273 of file ezmodule.php.
Referenced by eZModuleManager\availableModules(), findModule(), eZModuleFunctionInfo\loadDefinition(), and eZModuleOperationInfo\loadDefinition().
| eZModule::handleError | ( | $ | errorCode, |
| $ | errorType = false, |
||
| $ | parameters = array(), |
||
| $ | userParameters = false |
||
| ) |
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 301 of file ezmodule.php.
| eZModule::hasActionParameter | ( | $ | parameterName, |
| $ | view = '' |
||
| ) |
Definition at line 792 of file ezmodule.php.
| eZModule::hasAttribute | ( | $ | attr | ) |
Definition at line 604 of file ezmodule.php.
| eZModule::hasViewResult | ( | $ | view = '' | ) |
Definition at line 982 of file ezmodule.php.
Referenced by run().
| eZModule::initialize | ( | $ | path, |
| $ | file, | ||
| $ | moduleName, | ||
| $ | checkFileExistence = true |
||
| ) | [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 62 of file ezmodule.php.
Referenced by eZModule().
| eZModule::isCurrentAction | ( | $ | actionName, |
| $ | view = '' |
||
| ) |
Definition at line 836 of file ezmodule.php.
| eZModule::parameters | ( | $ | viewName = '' | ) |
Definition at line 493 of file ezmodule.php.
| eZModule::redirect | ( | $ | moduleName, |
| $ | viewName, | ||
| $ | parameters = array(), |
||
| $ | unorderedParameters = null, |
||
| $ | userParameters = false, |
||
| $ | anchor = false |
||
| ) |
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.
Definition at line 335 of file ezmodule.php.
| eZModule::redirectCurrent | ( | ) |
Redirects to the current module and view, it will use currentRedirectionURI() to figure out the URL.
Definition at line 416 of file ezmodule.php.
| eZModule::redirectionURI | ( | $ | moduleName, |
| $ | viewName, | ||
| $ | parameters = array(), |
||
| $ | unorderedParameters = null, |
||
| $ | userParameters = false, |
||
| $ | anchor = false |
||
| ) |
Definition at line 381 of file ezmodule.php.
| eZModule::redirectionURIForModule | ( | $ | module, |
| $ | viewName, | ||
| $ | parameters = array(), |
||
| $ | unorderedParameters = null, |
||
| $ | userParameters = false, |
||
| $ | anchor = false |
||
| ) |
Sames as redirectionURI but takes a module object instead of the name.
Definition at line 424 of file ezmodule.php.
Referenced by currentRedirectionURI(), redirectionURI(), and redirectModule().
| eZModule::redirectModule | ( | $ | module, |
| $ | viewName, | ||
| $ | parameters = array(), |
||
| $ | unorderedParameters = null, |
||
| $ | userParameters = false, |
||
| $ | anchor = false |
||
| ) |
Same as redirect() but takes a module object instead of the name.
Definition at line 366 of file ezmodule.php.
Referenced by redirect(), and redirectToView().
| eZModule::redirectStatus | ( | ) |
Definition at line 572 of file ezmodule.php.
| eZModule::redirectTo | ( | $ | uri | ) |
Makes sure that the module is redirected to the URI $uri when the function exits.
Definition at line 542 of file ezmodule.php.
Referenced by redirectCurrent(), and redirectModule().
| eZModule::redirectToView | ( | $ | viewName = '', |
| $ | parameters = array(), |
||
| $ | unorderedParameters = null, |
||
| $ | userParameters = false, |
||
| $ | anchor = false |
||
| ) |
Same as redirect() only redirects in the current module.
Definition at line 355 of file ezmodule.php.
| eZModule::redirectURI | ( | ) |
Definition at line 556 of file ezmodule.php.
| eZModule::run | ( | $ | functionName, |
| $ | parameters = array(), |
||
| $ | overrideParameters = false, |
||
| $ | userParameters = false |
||
| ) |
Tries to run the function $functionName in the current module.
| 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. |
Definition at line 1050 of file ezmodule.php.
| eZModule::runHooks | ( | $ | hookName, |
| $ | parameters = null |
||
| ) |
Runs all hooks found in the hook list named $hookName. The parameter array $parameters will be passed to each hook function.
Definition at line 881 of file ezmodule.php.
| eZModule::setActionParameter | ( | $ | parameterName, |
| $ | parameterValue, | ||
| $ | view = '' |
||
| ) |
Definition at line 744 of file ezmodule.php.
| eZModule::setCurrentAction | ( | $ | actionName, |
| $ | view = '' |
||
| ) |
Sets the current action in view $view to $actionName.
Definition at line 645 of file ezmodule.php.
| eZModule::setCurrentName | ( | $ | name | ) |
Sets the name of the currently running module to $name.
Definition at line 177 of file ezmodule.php.
| eZModule::setCurrentView | ( | $ | name | ) |
Sets the name of the currently running view to $name.
Definition at line 189 of file ezmodule.php.
| eZModule::setErrorCode | ( | $ | errorCode | ) |
Sets the current error code.
Definition at line 269 of file ezmodule.php.
Referenced by handleError().
| eZModule::setErrorModule | ( | $ | moduleName, |
| $ | viewName | ||
| ) |
Sets the name of the module which will be run on errors.
Definition at line 291 of file ezmodule.php.
| 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 250 of file ezmodule.php.
Referenced by forward(), handleError(), redirectTo(), and run().
| static eZModule::setGlobalPathList | ( | $ | pathList | ) | [static] |
Sets the global path list which is used for finding modules.
| $pathList | Is either an array with path strings or a single path string |
Definition at line 1336 of file ezmodule.php.
Referenced by eZScript\initialize(), and eZSiteAccess\reInitialise().
| eZModule::setRedirectStatus | ( | $ | status | ) |
Sets the status which will be set when redirecting.
Definition at line 581 of file ezmodule.php.
| eZModule::setRedirectURI | ( | $ | uri | ) |
Sets the URI which will be redirected to when the function exits.
Definition at line 564 of file ezmodule.php.
| eZModule::setTitle | ( | $ | title | ) |
Sets the current view for the module to $title.
Definition at line 169 of file ezmodule.php.
| eZModule::setUIComponentName | ( | $ | component | ) |
Sets the current component string to $component.
Definition at line 233 of file ezmodule.php.
| eZModule::setUIContextName | ( | $ | context | ) |
Sets the current context string to $context.
Definition at line 225 of file ezmodule.php.
| eZModule::setViewResult | ( | $ | result, |
| $ | view = '' |
||
| ) |
Definition at line 975 of file ezmodule.php.
| eZModule::singleFunction | ( | ) |
Definition at line 197 of file ezmodule.php.
Referenced by forward(), functionURI(), run(), and viewData().
| eZModule::title | ( | ) |
Definition at line 161 of file ezmodule.php.
| eZModule::uiComponentName | ( | ) |
The default value is the name of the currently running module, can be changed with setUIComponentName().
Definition at line 217 of file ezmodule.php.
| eZModule::uiContextName | ( | ) |
'navigation' Change the context with setUIContextName().
Definition at line 207 of file ezmodule.php.
| eZModule::unorderedParameters | ( | $ | viewName = '' | ) |
Definition at line 510 of file ezmodule.php.
| eZModule::uri | ( | ) |
Definition at line 136 of file ezmodule.php.
Referenced by attribute(), and functionURI().
| eZModule::viewData | ( | $ | viewName = '' | ) |
Definition at line 527 of file ezmodule.php.
Referenced by parameters(), and unorderedParameters().
| eZModule::viewResult | ( | $ | view = '' | ) |
Definition at line 989 of file ezmodule.php.
Referenced by run().
| eZModule::$ErrorCode |
Definition at line 1459 of file ezmodule.php.
| eZModule::$ExitStatus |
Definition at line 1458 of file ezmodule.php.
| eZModule::$Functions |
Definition at line 1454 of file ezmodule.php.
| eZModule::$HookList |
Definition at line 1463 of file ezmodule.php.
| eZModule::$Module |
Definition at line 1455 of file ezmodule.php.
Referenced by initialize().
| eZModule::$Name |
Definition at line 1456 of file ezmodule.php.
| eZModule::$NamedParameters |
Definition at line 1469 of file ezmodule.php.
| eZModule::$OriginalParameters |
Definition at line 1467 of file ezmodule.php.
| eZModule::$OriginalUnorderedParameters |
Definition at line 1470 of file ezmodule.php.
| eZModule::$OriginalViewParameters |
Definition at line 1468 of file ezmodule.php.
| eZModule::$Path |
Definition at line 1457 of file ezmodule.php.
| eZModule::$RedirectStatus |
Definition at line 1461 of file ezmodule.php.
| eZModule::$RedirectURI |
Definition at line 1460 of file ezmodule.php.
| eZModule::$Title |
Definition at line 1462 of file ezmodule.php.
| eZModule::$UIComponent |
The current UI context, by default the current module but can be changed depending on module or PHP code.
Definition at line 1476 of file ezmodule.php.
| eZModule::$UIComponentMatch |
Controls at which level UI component matching is done, either 'module' which uses module name or 'view' which uses view name.
Definition at line 1478 of file ezmodule.php.
| eZModule::$UIContext |
The current UI context, by default 'navigation' but can be changed depending on module or PHP code.
Definition at line 1474 of file ezmodule.php.
| eZModule::$UserParameters |
Definition at line 1471 of file ezmodule.php.
| eZModule::$ViewActions |
Definition at line 1464 of file ezmodule.php.
| eZModule::$ViewParameters |
Definition at line 1466 of file ezmodule.php.
| eZModule::$ViewResult |
Definition at line 1465 of file ezmodule.php.
| const eZModule::HOOK_STATUS_CANCEL_RUN = 1 |
Definition at line 47 of file ezmodule.php.
Referenced by runHooks().
| const eZModule::HOOK_STATUS_FAILED = 2 |
Definition at line 48 of file ezmodule.php.
Referenced by runHooks().
| const eZModule::HOOK_STATUS_OK = 0 |
Definition at line 46 of file ezmodule.php.
Referenced by runHooks().
| const eZModule::STATUS_FAILED = 2 |
Definition at line 42 of file ezmodule.php.
Referenced by handleError(), and run().
| const eZModule::STATUS_IDLE = 0 |
Definition at line 40 of file ezmodule.php.
Referenced by initialize().
| const eZModule::STATUS_OK = 1 |
Definition at line 41 of file ezmodule.php.
Referenced by run().
| const eZModule::STATUS_REDIRECT = 3 |
Definition at line 43 of file ezmodule.php.
Referenced by handleError(), and redirectTo().
| const eZModule::STATUS_RERUN = 4 |
Definition at line 44 of file ezmodule.php.
Referenced by handleError().