eZPublish  4.7
eZRedirectManager Class Reference

Handles generation of redirection URIs and redirection. More...

Static Public Member Functions

static redirectTo ($module, $default, $view=true, $disallowed=false, $preferredURI=false)
 
static redirectURI ($module, $default, $view=true, $disallowed=false, $preferredURI=false)
 

Detailed Description

Handles generation of redirection URIs and redirection.

Member Function Documentation

static eZRedirectManager::redirectTo (   $module,
  $default,
  $view = true,
  $disallowed = false,
  $preferredURI = false 
)
static

Generates a URI which can be used to redirect with, the uri is based on:

  • The last accessed view/non-view page if any (see $view parameter)
  • The uri is not the currently running module, if so use default
  • The default uri $default
Parameters
$moduleThe current module object
$defaultThe default URI to redirect to if all else fails. If set to false then it will not redirect if there is no url found but instead it will return false.
$viewIf true it will try to redirect to last accessed view URI.
$disallowedAn array with urls not allowed to redirect to or false to allow all
$preferredURIAn URI that is preferred for the caller. We redirect to that URI if it's specified and is valid.
Returns
true if the module was redirected or false if not.
Note
All URLs must start with a slash /
See Also
redirectURI()
static eZRedirectManager::redirectURI (   $module,
  $default,
  $view = true,
  $disallowed = false,
  $preferredURI = false 
)
static

Generates a URI which can be used to redirect with, the uri is based on:

  • The last accessed view/non-view page if any (see $view parameter)
  • The uri is not the currently running module, if so use default
  • The default uri $default
Returns
The new URI string or false if no uri could be made.
Parameters
$moduleThe current module object
$defaultThe default URI to redirect to if all else fails. If set to false then it will return false.
$viewIf true it will try to redirect to last accessed view URI.
$disallowedAn array with urls not allowed to redirect to or false to allow all
$preferredURIAn URI that is preferred for the caller. If that URI is valid, it's returned.
Note
All URLs must start with a slash /
See Also
redirectTo()

Referenced by redirectTo().


The documentation for this class was generated from the following file: