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

Public Member Functions

 __construct (\Psr\Log\LoggerInterface $logger, \Magento\Framework\Event\ManagerInterface $eventDispatcher, \Magento\Framework\App\CacheInterface $cacheManager, \Magento\Framework\App\State $appState, \Magento\Framework\Model\ActionValidator\RemoveAction $actionValidator)
 
 getCacheManager ()
 
 getEventDispatcher ()
 
 getLogger ()
 
 getAppState ()
 
 getActionValidator ()
 

Protected Attributes

 $_eventDispatcher
 
 $_cacheManager
 
 $_logger
 
 $_appState
 
 $_actionValidator
 

Detailed Description

Constructor modification point for Magento\Framework\Model\AbstractModel.

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()

__construct ( \Psr\Log\LoggerInterface  $logger,
\Magento\Framework\Event\ManagerInterface  $eventDispatcher,
\Magento\Framework\App\CacheInterface  $cacheManager,
\Magento\Framework\App\State  $appState,
\Magento\Framework\Model\ActionValidator\RemoveAction  $actionValidator 
)
Parameters
\Psr\Log\LoggerInterface$logger
\Magento\Framework\Event\ManagerInterface$eventDispatcher
\Magento\Framework\App\CacheInterface$cacheManager
\Magento\Framework\App\State$appState
\Magento\Framework\Model\ActionValidator\RemoveAction$actionValidator

Definition at line 58 of file Context.php.

64  {
65  $this->_eventDispatcher = $eventDispatcher;
66  $this->_cacheManager = $cacheManager;
67  $this->_appState = $appState;
68  $this->_logger = $logger;
69  $this->_actionValidator = $actionValidator;
70  }
$logger

Member Function Documentation

◆ getActionValidator()

getActionValidator ( )
Returns
\Magento\Framework\Model\ActionValidator\RemoveAction

Definition at line 107 of file Context.php.

108  {
110  }

◆ getAppState()

getAppState ( )
Returns
\Magento\Framework\App\State

Definition at line 99 of file Context.php.

100  {
101  return $this->_appState;
102  }

◆ getCacheManager()

getCacheManager ( )
Returns
\Magento\Framework\App\CacheInterface

Definition at line 75 of file Context.php.

76  {
77  return $this->_cacheManager;
78  }

◆ getEventDispatcher()

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

Definition at line 83 of file Context.php.

84  {
86  }

◆ getLogger()

getLogger ( )
Returns
\Psr\Log\LoggerInterface

Definition at line 91 of file Context.php.

92  {
93  return $this->_logger;
94  }

Field Documentation

◆ $_actionValidator

$_actionValidator
protected

Definition at line 49 of file Context.php.

◆ $_appState

$_appState
protected

Definition at line 44 of file Context.php.

◆ $_cacheManager

$_cacheManager
protected

Definition at line 34 of file Context.php.

◆ $_eventDispatcher

$_eventDispatcher
protected

Definition at line 29 of file Context.php.

◆ $_logger

$_logger
protected

Definition at line 39 of file Context.php.


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