Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Context Class Reference
Inheritance diagram for Context:
ContextInterface Context

Public Member Functions

 __construct (\Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ResponseInterface $response, \Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $url, \Magento\Framework\App\Response\RedirectInterface $redirect, \Magento\Framework\App\ActionFlag $actionFlag, \Magento\Framework\App\ViewInterface $view, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory, ResultFactory $resultFactory)
 
 getActionFlag ()
 
 getEventManager ()
 
 getView ()
 
 getObjectManager ()
 
 getRedirect ()
 
 getRequest ()
 
 getResponse ()
 
 getUrl ()
 
 getMessageManager ()
 
 getResultRedirectFactory ()
 
 getResultFactory ()
 

Protected Attributes

 $_request
 
 $_response
 
 $_objectManager
 
 $_eventManager
 
 $_url
 
 $_redirect
 
 $_actionFlag
 
 $_view
 
 $messageManager
 
 $resultRedirectFactory
 
 $resultFactory
 

Detailed Description

Constructor modification point for Magento\Framework\App\Action.

All context classes were introduced to allow for backwards compatible constructor modifications of classes that were supposed to be extended by extension developers.

Do not call methods of this class directly.

As Magento moves from inheritance-based APIs all such classes will be deprecated together with the classes they were introduced for.

@api

Since
100.0.2

Definition at line 24 of file Context.php.

Constructor & Destructor Documentation

◆ __construct()

Parameters
\Magento\Framework\App\RequestInterface$request
\Magento\Framework\App\ResponseInterface$response
\Magento\Framework\ObjectManagerInterface$objectManager
\Magento\Framework\Event\ManagerInterface$eventManager
\Magento\Framework\UrlInterface$url
\Magento\Framework\App\Response\RedirectInterface$redirect
\Magento\Framework\App\ActionFlag$actionFlag
\Magento\Framework\App\ViewInterface$view
\Magento\Framework\Message\ManagerInterface$messageManager
\Magento\Framework\Controller\Result\RedirectFactory$resultRedirectFactory
\Magento\Framework\Controller\ResultFactory$resultFactory@SuppressWarnings(PHPMD.ExcessiveParameterList)

Definition at line 96 of file Context.php.

108  {
109  $this->_request = $request;
110  $this->_response = $response;
111  $this->_objectManager = $objectManager;
112  $this->_eventManager = $eventManager;
113  $this->_url = $url;
114  $this->_redirect = $redirect;
115  $this->_actionFlag = $actionFlag;
116  $this->_view = $view;
117  $this->messageManager = $messageManager;
118  $this->resultRedirectFactory = $resultRedirectFactory;
119  $this->resultFactory = $resultFactory;
120  }
$response
Definition: 404.php:11
$objectManager
Definition: bootstrap.php:17

Member Function Documentation

◆ getActionFlag()

getActionFlag ( )
Returns
\Magento\Framework\App\ActionFlag

Definition at line 125 of file Context.php.

126  {
127  return $this->_actionFlag;
128  }

◆ getEventManager()

getEventManager ( )
Returns
\Magento\Framework\Event\ManagerInterface

Definition at line 133 of file Context.php.

134  {
135  return $this->_eventManager;
136  }

◆ getMessageManager()

getMessageManager ( )
Returns
\Magento\Framework\Message\ManagerInterface

Definition at line 189 of file Context.php.

190  {
191  return $this->messageManager;
192  }

◆ getObjectManager()

getObjectManager ( )
Returns
\Magento\Framework\ObjectManagerInterface

Definition at line 149 of file Context.php.

150  {
151  return $this->_objectManager;
152  }

◆ getRedirect()

getRedirect ( )
Returns
\Magento\Framework\App\Response\RedirectInterface

Definition at line 157 of file Context.php.

158  {
159  return $this->_redirect;
160  }

◆ getRequest()

getRequest ( )
Returns
\Magento\Framework\App\RequestInterface

Definition at line 165 of file Context.php.

166  {
167  return $this->_request;
168  }

◆ getResponse()

getResponse ( )
Returns
\Magento\Framework\App\ResponseInterface

Definition at line 173 of file Context.php.

174  {
175  return $this->_response;
176  }

◆ getResultFactory()

getResultFactory ( )
Returns
\Magento\Framework\Controller\ResultFactory

Definition at line 205 of file Context.php.

206  {
207  return $this->resultFactory;
208  }

◆ getResultRedirectFactory()

getResultRedirectFactory ( )
Returns
\Magento\Framework\Controller\Result\RedirectFactory

Definition at line 197 of file Context.php.

◆ getUrl()

getUrl ( )
Returns
\Magento\Framework\UrlInterface

Definition at line 181 of file Context.php.

182  {
183  return $this->_url;
184  }

◆ getView()

getView ( )
Returns
\Magento\Framework\App\ViewInterface

Definition at line 141 of file Context.php.

142  {
143  return $this->_view;
144  }

Field Documentation

◆ $_actionFlag

$_actionFlag
protected

Definition at line 59 of file Context.php.

◆ $_eventManager

$_eventManager
protected

Definition at line 44 of file Context.php.

◆ $_objectManager

$_objectManager
protected

Definition at line 39 of file Context.php.

◆ $_redirect

$_redirect
protected

Definition at line 54 of file Context.php.

◆ $_request

$_request
protected

Definition at line 29 of file Context.php.

◆ $_response

$_response
protected

Definition at line 34 of file Context.php.

◆ $_url

$_url
protected

Definition at line 49 of file Context.php.

◆ $_view

$_view
protected

Definition at line 64 of file Context.php.

◆ $messageManager

$messageManager
protected

Definition at line 69 of file Context.php.

◆ $resultFactory

$resultFactory
protected

Definition at line 79 of file Context.php.

◆ $resultRedirectFactory

$resultRedirectFactory
protected

Definition at line 74 of file Context.php.


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