TYPO3
7.6
|
Public Member Functions | |
buildUriFromRoute ($name, $parameters=array(), $referenceType=self::ABSOLUTE_PATH) | |
buildUriFromModule ($moduleName, $parameters=array(), $referenceType=self::ABSOLUTE_PATH) | |
buildUriFromAjaxId ($ajaxIdentifier, $parameters=array(), $referenceType=self::ABSOLUTE_PATH) | |
Public Attributes | |
const | ABSOLUTE_URL = 'url' |
const | ABSOLUTE_PATH = 'absolute' |
Protected Member Functions | |
loadBackendRoutes () | |
buildUri ($parameters, $referenceType) | |
Protected Attributes | |
$routes | |
Main UrlGenerator for creating URLs for the Backend. Generates a URL based on an identifier defined by Configuration/Backend/Routes.php of an extension, and adds some more parameters to the URL.
Currently only available and useful when called from Router->generate() as the information about possible routes needs to be handed over.
Definition at line 31 of file backend/Classes/Routing/UriBuilder.php.
|
protected |
Internal method building a Uri object, merging the GET parameters array into a flat queryString
array | $parameters | An array of GET parameters |
string | $referenceType | The type of reference to be generated (one of the constants) |
Definition at line 160 of file backend/Classes/Routing/UriBuilder.php.
References PathUtility\getAbsoluteWebPath(), GeneralUtility\getIndpEnv(), GeneralUtility\implodeArrayForUrl(), and GeneralUtility\makeInstance().
Referenced by UriBuilder\buildUriFromAjaxId(), UriBuilder\buildUriFromModule(), and UriBuilder\buildUriFromRoute().
buildUriFromAjaxId | ( | $ajaxIdentifier, | |
$parameters = array() , |
|||
$referenceType = self::ABSOLUTE_PATH |
|||
) |
Returns the Ajax URL for a given AjaxID including a CSRF token.
This method is only called by the core and must not be used by extensions. Ajax URLs of all registered backend Ajax handlers are automatically published to JavaScript inline settings: TYPO3.settings.ajaxUrls['ajaxId']
string | $ajaxIdentifier | the ajaxID (used as GET parameter) |
array | $parameters | An array of parameters |
string | $referenceType | The type of reference to be generated (one of the constants) |
Definition at line 141 of file backend/Classes/Routing/UriBuilder.php.
References $GLOBALS, UriBuilder\buildUri(), and FormProtectionFactory\get().
buildUriFromModule | ( | $moduleName, | |
$parameters = array() , |
|||
$referenceType = self::ABSOLUTE_PATH |
|||
) |
Generate a URI for a backend module, does not check if a module is available though
string | $moduleName | The name of the module |
array | $parameters | An array of parameters |
string | $referenceType | The type of reference to be generated (one of the constants) |
Definition at line 119 of file backend/Classes/Routing/UriBuilder.php.
References UriBuilder\buildUri(), and FormProtectionFactory\get().
buildUriFromRoute | ( | $name, | |
$parameters = array() , |
|||
$referenceType = self::ABSOLUTE_PATH |
|||
) |
Generates a URL or path for a specific route based on the given parameters. When the route is configured with "access=public" then the token generation is left out.
If there is no route with the given name, the generator throws the RouteNotFoundException.
string | $name | The name of the route |
array | $parameters | An array of parameters |
string | $referenceType | The type of reference to be generated (one of the constants) |
RouteNotFoundException | If the named route doesn't exist |
Definition at line 69 of file backend/Classes/Routing/UriBuilder.php.
References UriBuilder\buildUri(), FormProtectionFactory\get(), and UriBuilder\loadBackendRoutes().
|
protected |
Fetches the available routes from the Router to be used for generating routes
Definition at line 51 of file backend/Classes/Routing/UriBuilder.php.
References GeneralUtility\makeInstance().
Referenced by UriBuilder\buildUriFromRoute().
|
protected |
Definition at line 46 of file backend/Classes/Routing/UriBuilder.php.
const ABSOLUTE_PATH = 'absolute' |
Generates an absolute path
Definition at line 41 of file backend/Classes/Routing/UriBuilder.php.
const ABSOLUTE_URL = 'url' |
Generates an absolute URL
Definition at line 36 of file backend/Classes/Routing/UriBuilder.php.