Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
UrlInterface Interface Reference
Inheritance diagram for UrlInterface:
UrlInterface Url

Public Member Functions

 getSecretKey ($routeName=null, $controller=null, $action=null)
 
 useSecretKey ()
 
 turnOnSecretKey ()
 
 turnOffSecretKey ()
 
 renewSecretUrls ()
 
 getStartupPageUrl ()
 
 setSession (\Magento\Backend\Model\Auth\Session $session)
 
 getAreaFrontName ()
 
 findFirstAvailableMenu ()
 
- Public Member Functions inherited from UrlInterface
 getUseSession ()
 
 getBaseUrl ($params=[])
 
 getCurrentUrl ()
 
 getRouteUrl ($routePath=null, $routeParams=null)
 
 addSessionParam ()
 
 addQueryParams (array $data)
 
 setQueryParam ($key, $data)
 
 getUrl ($routePath=null, $routeParams=null)
 
 escape ($value)
 
 getDirectUrl ($url, $params=[])
 
 sessionUrlVar ($html)
 
 isOwnOriginUrl ()
 
 getRedirectUrl ($url)
 
 setScope ($params)
 

Data Fields

const SECRET_KEY_PARAM_NAME = 'key'
 
const XML_PATH_STARTUP_MENU_ITEM = 'admin/startup/menu_item_id'
 
- Data Fields inherited from UrlInterface
const URL_TYPE_LINK = 'link'
 
const URL_TYPE_DIRECT_LINK = 'direct_link'
 
const URL_TYPE_WEB = 'web'
 
const URL_TYPE_MEDIA = 'media'
 
const URL_TYPE_STATIC = 'static'
 
const URL_TYPE_JS = 'js'
 
const DEFAULT_URL_TYPE = 'link'
 
const DEFAULT_CONTROLLER_NAME = 'index'
 
const DEFAULT_ACTION_NAME = 'index'
 
const REWRITE_REQUEST_PATH_ALIAS = 'rewrite_request_path'
 
const SESSION_NAMESPACE = 'frontend'
 

Detailed Description

@api

Since
100.0.2

Definition at line 12 of file UrlInterface.php.

Member Function Documentation

◆ findFirstAvailableMenu()

findFirstAvailableMenu ( )

Find first menu item that user is able to access

Returns
string

Implemented in Url.

◆ getAreaFrontName()

getAreaFrontName ( )

Return backend area front name, defined in configuration

Returns
string

Implemented in Url.

◆ getSecretKey()

getSecretKey (   $routeName = null,
  $controller = null,
  $action = null 
)

Generate secret key for controller and action based on form key

Parameters
string$routeName
string$controllerController name
string$actionAction name
Returns
string

Implemented in Url.

◆ getStartupPageUrl()

getStartupPageUrl ( )

Find admin start page url

Returns
string

Implemented in Url.

◆ renewSecretUrls()

renewSecretUrls ( )

Refresh admin menu cache etc.

Returns
\Magento\Backend\Model\UrlInterface

Implemented in Url.

◆ setSession()

setSession ( \Magento\Backend\Model\Auth\Session  $session)

Set custom auth session

Parameters
\Magento\Backend\Model\Auth\Session$session
Returns
\Magento\Backend\Model\UrlInterface

Implemented in Url.

◆ turnOffSecretKey()

turnOffSecretKey ( )

Disable secret key using

Returns
\Magento\Backend\Model\UrlInterface

Implemented in Url.

◆ turnOnSecretKey()

turnOnSecretKey ( )

Enable secret key using

Returns
\Magento\Backend\Model\UrlInterface

Implemented in Url.

◆ useSecretKey()

useSecretKey ( )

Return secret key settings flag

Returns
bool

Implemented in Url.

Field Documentation

◆ SECRET_KEY_PARAM_NAME

const SECRET_KEY_PARAM_NAME = 'key'

Secret key query param name

Definition at line 17 of file UrlInterface.php.

◆ XML_PATH_STARTUP_MENU_ITEM

const XML_PATH_STARTUP_MENU_ITEM = 'admin/startup/menu_item_id'

xpath to startup page in configuration

Definition at line 22 of file UrlInterface.php.


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