Mage_Bundle_Adminhtml_Bundle_SelectionController
extends Mage_Adminhtml_Controller_Action
in package
Maho
Tags
Table of Contents
Constants
- ADMIN_RESOURCE = 'catalog/products'
- ACL resource
- FLAG_IS_URLS_CHECKED = 'check_url_settings'
- Name of "is URLs checked" flag
- FLAG_NO_CHECK_INSTALLATION = 'no-install-check'
- FLAG_NO_COOKIES_REDIRECT = 'no-cookies-redirect'
- FLAG_NO_DISPATCH = 'no-dispatch'
- FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch'
- FLAG_NO_POST_DISPATCH = 'no-postDispatch'
- FLAG_NO_PRE_DISPATCH = 'no-preDispatch'
- FLAG_NO_START_SESSION = 'no-startSession'
- PARAM_NAME_BASE64_URL = 'r64'
- PARAM_NAME_ERROR_URL = 'error_url'
- PARAM_NAME_REFERER_URL = 'referer_url'
- PARAM_NAME_SUCCESS_URL = 'success_url'
- PARAM_NAME_URL_ENCODED = 'uenc'
- PROFILER_KEY = 'mage::dispatch::controller::action'
- SESSION_MAX_LIFETIME = 60 * 60 * 24 * 400
- SESSION_MIN_LIFETIME = 60
- SESSION_NAMESPACE = 'maho_admin_session'
- Session constants to refer in other places
Properties
- $_cookieCheckActions : array<string|int, mixed>
- Action list where need check enabled cookie
- $_currentArea : string
- Currently used area
- $_flags : array<string|int, mixed>
- Action flags
- $_forcedFormKeyActions : array<string|int, mixed>
- Array of actions which can't be processed without form key validation
- $_isLayoutLoaded : bool
- Whether layout is loaded
- $_publicActions : array<string|int, mixed>
- Array of actions which can be processed without secret key validation
- $_realModuleName : string
- Real module name (like 'Mage_Module')
- $_removeDefaultTitle : bool
- Whether the default title should be removed
- $_request : Mage_Core_Controller_Request_Http
- Request object
- $_response : Mage_Core_Controller_Response_Http
- Response object
- $_sessionNamespace : string
- Namespace for session.
- $_titles : array<string|int, mixed>
- Title parts to be rendered in the page head title
- $_usedModuleName : mixed
- Used module name in current adminhtml controller
Methods
- __() : string
- Translate a phrase
- __construct() : mixed
- addActionLayoutHandles() : $this
- deniedAction() : mixed
- dispatch() : mixed
- generateLayoutBlocks() : $this
- generateLayoutXml() : $this
- getActionMethodName() : string
- Retrieve action method name
- getFlag() : array<string|int, mixed>|bool
- Retrieve flag value
- getFullActionName() : string
- Retrieve full bane of current action current controller and current module
- getLayout() : Mage_Core_Model_Layout
- Retrieve current layout object
- getRequest() : Mage_Core_Controller_Request_Http
- Retrieve request object
- getResponse() : Mage_Core_Controller_Response_Http
- Retrieve response object
- getUrl() : string
- Generate url by route and parameters
- getUsedModuleName() : string
- Retrieve currently used module name
- gridAction() : Zend_Controller_Response_Abstract
- hasAction() : bool
- initLayoutMessages() : $this
- Initializing layout messages by message storage(s), loading and adding messages to layout messages block
- loadLayout() : $this
- Load layout by handles(s)
- loadLayoutUpdates() : $this
- noCookiesAction() : mixed
- norouteAction() : mixed
- postDispatch() : mixed
- Dispatches event after action
- preDispatch() : $this
- Controller pre-dispatch method
- renderLayout() : $this|void
- Rendering layout
- searchAction() : Zend_Controller_Response_Abstract
- setFlag() : $this
- Setting flag value
- setRedirectWithCookieCheck() : $this
- Set redirect into response with session id in URL if it is enabled.
- setUsedModuleName() : $this
- Set currently used module name
- _addBreadcrumb() : $this
- _addContent() : $this
- _addJs() : mixed
- _addLeft() : mixed
- _checkIsForcedFormKeyAction() : mixed
- Check forced use form key for action
- _construct() : void
- _filterDates() : array<string|int, mixed>
- Convert dates in array from localized to internal format
- _filterDateTime() : array<string|int, mixed>
- Convert dates with time in array from localized to internal format
- _forward() : mixed
- Throw control to different action (control and module if was specified).
- _getHelper() : Mage_Adminhtml_Helper_Data
- Retrieve base admihtml helper
- _getRealModuleName() : string
- Get real module name (like 'Mage_Module')
- _getRefererUrl() : string
- Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param)
- _getSession() : Mage_Adminhtml_Model_Session
- Retrieve adminhtml session model object
- _initLayoutMessages() : $this
- Initializing layout messages by message storage(s), loading and adding messages to layout messages block
- _isAllowed() : bool
- Check current user permission on resource and privilege
- _isUrlInternal() : bool
- Check url to be used as internal
- _prepareDownloadResponse() : $this
- Declare headers and content file in response for file download
- _redirect() : $this
- Set redirect into response
- _redirectError() : $this
- Redirect to error page
- _redirectReferer() : Mage_Adminhtml_Controller_Action
- Set referer url for redirect in response
- _redirectSuccess() : $this
- Redirect to success page
- _redirectUrl() : $this
- Set redirect url into response
- _renderTitles() : mixed
- Prepare titles in the 'head' layout block Supposed to work only in actions where layout is rendered Falls back to the default logic if there are no titles eventually
- _rewrite() : bool
- Support for controllers rewrites
- _setActiveMenu() : $this
- Define active menu item in menu block
- _setForcedFormKeyActions() : mixed
- Set actions name for forced use form key if "Secret Key to URLs" disabled
- _title() : $this
- Add an extra title to the end or one from the end, or remove all
- _validateCurrentPassword() : mixed
- Validate password for current admin user
- _validateFormKey() : bool
- Validate Form Key
- _validateRequestParam() : bool
- Validate request parameter
- _validateRequestParams() : bool
- Validate request parameters
- _validateSecretKey() : bool
- Validate Secret Key
Constants
ADMIN_RESOURCE
ACL resource
public
mixed
ADMIN_RESOURCE
= 'catalog/products'
Tags
FLAG_IS_URLS_CHECKED
Name of "is URLs checked" flag
public
mixed
FLAG_IS_URLS_CHECKED
= 'check_url_settings'
FLAG_NO_CHECK_INSTALLATION
public
mixed
FLAG_NO_CHECK_INSTALLATION
= 'no-install-check'
FLAG_NO_COOKIES_REDIRECT
public
mixed
FLAG_NO_COOKIES_REDIRECT
= 'no-cookies-redirect'
FLAG_NO_DISPATCH
public
mixed
FLAG_NO_DISPATCH
= 'no-dispatch'
FLAG_NO_DISPATCH_BLOCK_EVENT
public
mixed
FLAG_NO_DISPATCH_BLOCK_EVENT
= 'no-beforeGenerateLayoutBlocksDispatch'
FLAG_NO_POST_DISPATCH
public
mixed
FLAG_NO_POST_DISPATCH
= 'no-postDispatch'
FLAG_NO_PRE_DISPATCH
public
mixed
FLAG_NO_PRE_DISPATCH
= 'no-preDispatch'
FLAG_NO_START_SESSION
public
mixed
FLAG_NO_START_SESSION
= 'no-startSession'
PARAM_NAME_BASE64_URL
public
mixed
PARAM_NAME_BASE64_URL
= 'r64'
PARAM_NAME_ERROR_URL
public
mixed
PARAM_NAME_ERROR_URL
= 'error_url'
PARAM_NAME_REFERER_URL
public
mixed
PARAM_NAME_REFERER_URL
= 'referer_url'
PARAM_NAME_SUCCESS_URL
public
mixed
PARAM_NAME_SUCCESS_URL
= 'success_url'
PARAM_NAME_URL_ENCODED
public
mixed
PARAM_NAME_URL_ENCODED
= 'uenc'
PROFILER_KEY
public
mixed
PROFILER_KEY
= 'mage::dispatch::controller::action'
SESSION_MAX_LIFETIME
public
mixed
SESSION_MAX_LIFETIME
= 60 * 60 * 24 * 400
SESSION_MIN_LIFETIME
public
mixed
SESSION_MIN_LIFETIME
= 60
SESSION_NAMESPACE
Session constants to refer in other places
public
mixed
SESSION_NAMESPACE
= 'maho_admin_session'
Max lifetime is set to 400 days, as chromium based browsers will not allow anything higher https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-cookie-lifetime-limits
Properties
$_cookieCheckActions
Action list where need check enabled cookie
protected
array<string|int, mixed>
$_cookieCheckActions
= []
$_currentArea
Currently used area
protected
string
$_currentArea
= \Mage_Core_Model_App_Area::AREA_ADMINHTML
$_flags
Action flags
protected
array<string|int, mixed>
$_flags
= []
for example used to disable rendering default layout
$_forcedFormKeyActions
Array of actions which can't be processed without form key validation
protected
array<string|int, mixed>
$_forcedFormKeyActions
= []
$_isLayoutLoaded
Whether layout is loaded
protected
bool
$_isLayoutLoaded
= \false
Tags
$_publicActions
Array of actions which can be processed without secret key validation
protected
array<string|int, mixed>
$_publicActions
= []
$_realModuleName
Real module name (like 'Mage_Module')
protected
string
$_realModuleName
$_removeDefaultTitle
Whether the default title should be removed
protected
bool
$_removeDefaultTitle
= \false
Tags
$_request
Request object
protected
Mage_Core_Controller_Request_Http
$_request
$_response
Response object
protected
Mage_Core_Controller_Response_Http
$_response
$_sessionNamespace
Namespace for session.
protected
string
$_sessionNamespace
= self::SESSION_NAMESPACE
$_titles
Title parts to be rendered in the page head title
protected
array<string|int, mixed>
$_titles
= []
Tags
$_usedModuleName
Used module name in current adminhtml controller
protected
mixed
$_usedModuleName
= 'adminhtml'
Methods
__()
Translate a phrase
public
__() : string
Return values
string__construct()
public
__construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response[, array<string|int, mixed> $invokeArgs = [] ]) : mixed
Parameters
- $request : Zend_Controller_Request_Abstract
- $response : Zend_Controller_Response_Abstract
- $invokeArgs : array<string|int, mixed> = []
addActionLayoutHandles()
public
addActionLayoutHandles() : $this
Tags
Return values
$thisdeniedAction()
public
deniedAction() : mixed
dispatch()
public
dispatch(string $action) : mixed
Parameters
- $action : string
generateLayoutBlocks()
public
generateLayoutBlocks() : $this
Return values
$thisgenerateLayoutXml()
public
generateLayoutXml() : $this
Return values
$thisgetActionMethodName()
Retrieve action method name
public
getActionMethodName(string $action) : string
Parameters
- $action : string
Return values
stringgetFlag()
Retrieve flag value
public
getFlag(string $action[, string $flag = '' ]) : array<string|int, mixed>|bool
Parameters
- $action : string
- $flag : string = ''
Return values
array<string|int, mixed>|boolgetFullActionName()
Retrieve full bane of current action current controller and current module
public
getFullActionName([string $delimiter = '_' ]) : string
Parameters
- $delimiter : string = '_'
Return values
stringgetLayout()
Retrieve current layout object
public
getLayout() : Mage_Core_Model_Layout
Return values
Mage_Core_Model_LayoutgetRequest()
Retrieve request object
public
getRequest() : Mage_Core_Controller_Request_Http
Return values
Mage_Core_Controller_Request_HttpgetResponse()
Retrieve response object
public
getResponse() : Mage_Core_Controller_Response_Http
Return values
Mage_Core_Controller_Response_HttpgetUrl()
Generate url by route and parameters
public
getUrl([string $route = '' ][, array<string|int, mixed> $params = [] ]) : string
Parameters
- $route : string = ''
- $params : array<string|int, mixed> = []
Return values
stringgetUsedModuleName()
Retrieve currently used module name
public
getUsedModuleName() : string
Return values
stringgridAction()
public
gridAction() : Zend_Controller_Response_Abstract
Return values
Zend_Controller_Response_AbstracthasAction()
public
hasAction(string $action) : bool
Parameters
- $action : string
Return values
boolinitLayoutMessages()
Initializing layout messages by message storage(s), loading and adding messages to layout messages block
public
initLayoutMessages(string|array<string|int, mixed> $messagesStorage) : $this
Parameters
- $messagesStorage : string|array<string|int, mixed>
Return values
$thisloadLayout()
Load layout by handles(s)
public
loadLayout([mixed $ids = null ][, mixed $generateBlocks = true ][, mixed $generateXml = true ]) : $this
Parameters
- $ids : mixed = null
- $generateBlocks : mixed = true
- $generateXml : mixed = true
Attributes
- #[Override]
Return values
$thisloadLayoutUpdates()
public
loadLayoutUpdates() : $this
Tags
Return values
$thisnoCookiesAction()
public
noCookiesAction() : mixed
norouteAction()
public
norouteAction([mixed $coreRoute = null ]) : mixed
Parameters
- $coreRoute : mixed = null
Attributes
- #[Override]
postDispatch()
Dispatches event after action
public
postDispatch() : mixed
preDispatch()
Controller pre-dispatch method
public
preDispatch() : $this
Attributes
- #[Override]
Return values
$thisrenderLayout()
Rendering layout
public
renderLayout([string $output = '' ]) : $this|void
Parameters
- $output : string = ''
Return values
$this|voidsearchAction()
public
searchAction() : Zend_Controller_Response_Abstract
Return values
Zend_Controller_Response_AbstractsetFlag()
Setting flag value
public
setFlag(string $action, string $flag, string|int|bool $value) : $this
Parameters
- $action : string
- $flag : string
- $value : string|int|bool
Return values
$thissetRedirectWithCookieCheck()
Set redirect into response with session id in URL if it is enabled.
public
setRedirectWithCookieCheck(string $path[, array<string|int, mixed> $arguments = [] ]) : $this
It allows to distinguish primordial request from browser with cookies disabled.
Parameters
- $path : string
- $arguments : array<string|int, mixed> = []
Return values
$thissetUsedModuleName()
Set currently used module name
public
setUsedModuleName(string $moduleName) : $this
Parameters
- $moduleName : string
Return values
$this_addBreadcrumb()
protected
_addBreadcrumb(mixed $label, mixed $title[, mixed $link = null ]) : $this
Parameters
- $label : mixed
- $title : mixed
- $link : mixed = null
Return values
$this_addContent()
protected
_addContent(Mage_Core_Block_Abstract $block) : $this
Parameters
- $block : Mage_Core_Block_Abstract
Return values
$this_addJs()
protected
_addJs(Mage_Core_Block_Abstract $block) : mixed
Parameters
- $block : Mage_Core_Block_Abstract
_addLeft()
protected
_addLeft(Mage_Core_Block_Abstract $block) : mixed
Parameters
- $block : Mage_Core_Block_Abstract
_checkIsForcedFormKeyAction()
Check forced use form key for action
protected
_checkIsForcedFormKeyAction() : mixed
@return bool
_construct()
protected
_construct() : void
Attributes
- #[Override]
_filterDates()
Convert dates in array from localized to internal format
protected
_filterDates(array<string|int, mixed> $array, array<string|int, mixed> $dateFields) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
- $dateFields : array<string|int, mixed>
Return values
array<string|int, mixed>_filterDateTime()
Convert dates with time in array from localized to internal format
protected
_filterDateTime(array<string|int, mixed> $array, array<string|int, mixed> $dateFields) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
- $dateFields : array<string|int, mixed>
Return values
array<string|int, mixed>_forward()
Throw control to different action (control and module if was specified).
protected
_forward(mixed $action[, mixed $controller = null ][, mixed $module = null ][, array<string|int, mixed>|null $params = null ]) : mixed
Parameters
- $action : mixed
- $controller : mixed = null
- $module : mixed = null
- $params : array<string|int, mixed>|null = null
Attributes
- #[Override]
_getHelper()
Retrieve base admihtml helper
protected
_getHelper() : Mage_Adminhtml_Helper_Data
Return values
Mage_Adminhtml_Helper_Data_getRealModuleName()
Get real module name (like 'Mage_Module')
protected
_getRealModuleName() : string
Return values
string_getRefererUrl()
Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param)
protected
_getRefererUrl() : string
Return values
string_getSession()
Retrieve adminhtml session model object
protected
_getSession() : Mage_Adminhtml_Model_Session
Return values
Mage_Adminhtml_Model_Session_initLayoutMessages()
Initializing layout messages by message storage(s), loading and adding messages to layout messages block
protected
_initLayoutMessages(string|array<string|int, mixed> $messagesStorage) : $this
Parameters
- $messagesStorage : string|array<string|int, mixed>
Return values
$this_isAllowed()
Check current user permission on resource and privilege
protected
_isAllowed() : bool
Return values
bool_isUrlInternal()
Check url to be used as internal
protected
_isUrlInternal(string $url) : bool
Parameters
- $url : string
Return values
bool_prepareDownloadResponse()
Declare headers and content file in response for file download
protected
_prepareDownloadResponse(string $fileName, string|array<string|int, mixed> $content[, string $contentType = 'application/octet-stream' ][, int $contentLength = null ]) : $this
Parameters
- $fileName : string
- $content : string|array<string|int, mixed>
-
set to null to avoid starting output, $contentLength should be set explicitly in that case
- $contentType : string = 'application/octet-stream'
- $contentLength : int = null
-
explicit content length, if strlen($content) isn't applicable
Return values
$this_redirect()
Set redirect into response
protected
_redirect(string $path[, array<string|int, mixed> $arguments = [] ]) : $this
Parameters
- $path : string
- $arguments : array<string|int, mixed> = []
Attributes
- #[Override]
Return values
$this_redirectError()
Redirect to error page
protected
_redirectError(string $defaultUrl) : $this
Parameters
- $defaultUrl : string
Return values
$this_redirectReferer()
Set referer url for redirect in response
protected
_redirectReferer([string $defaultUrl = null ]) : Mage_Adminhtml_Controller_Action
Is overridden here to set defaultUrl to admin url
Parameters
- $defaultUrl : string = null
Attributes
- #[Override]
Return values
Mage_Adminhtml_Controller_Action_redirectSuccess()
Redirect to success page
protected
_redirectSuccess(string $defaultUrl) : $this
Parameters
- $defaultUrl : string
Return values
$this_redirectUrl()
Set redirect url into response
protected
_redirectUrl(string $url) : $this
Parameters
- $url : string
Return values
$this_renderTitles()
Prepare titles in the 'head' layout block Supposed to work only in actions where layout is rendered Falls back to the default logic if there are no titles eventually
protected
_renderTitles() : mixed
Tags
_rewrite()
Support for controllers rewrites
protected
_rewrite() : bool
Example of configuration:
This will override:
- core_module/core_controller/core_action to new_module/new_controller/new_action
- all other actions of core_module/core_controller to new_module/new_controller
Return values
bool —true if rewrite happened
_setActiveMenu()
Define active menu item in menu block
protected
_setActiveMenu(mixed $menuPath) : $this
Parameters
- $menuPath : mixed
Return values
$this_setForcedFormKeyActions()
Set actions name for forced use form key if "Secret Key to URLs" disabled
protected
_setForcedFormKeyActions(array<string|int, mixed>|string $actionNames) : mixed
Parameters
- $actionNames : array<string|int, mixed>|string
-
- action names for forced use form key
_title()
Add an extra title to the end or one from the end, or remove all
protected
_title([string|false|int|null $text = null ][, bool $resetIfExists = true ]) : $this
Usage examples:
$this->_title('foo')->_title('bar');
=> bar / foo /
$this->_title()->_title('foo')->_title('bar'); => bar / foo
$this->_title('foo')->_title(false)->_title('bar');
bar /
Parameters
- $text : string|false|int|null = null
- $resetIfExists : bool = true
Tags
Return values
$this_validateCurrentPassword()
Validate password for current admin user
protected
_validateCurrentPassword(string $password) : mixed
Parameters
- $password : string
-
- current password
Return values
mixed —- returns true or array of errors
_validateFormKey()
Validate Form Key
protected
_validateFormKey() : bool
Return values
bool_validateRequestParam()
Validate request parameter
protected
_validateRequestParam(string $param[, string $pattern = '' ]) : bool
Parameters
- $param : string
-
- request parameter
- $pattern : string = ''
-
- pattern that should be contained in parameter
Return values
bool_validateRequestParams()
Validate request parameters
protected
_validateRequestParams(array<string|int, mixed> $params[, string $pattern = '' ]) : bool
Parameters
- $params : array<string|int, mixed>
-
- array of request parameters
- $pattern : string = ''
-
- pattern that should be contained in parameter
Return values
bool_validateSecretKey()
Validate Secret Key
protected
_validateSecretKey() : bool