Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Address Class Reference
Inheritance diagram for Address:
Action AbstractAction ActionInterface Delete Edit Form FormPost Index NewAction

Public Member Functions

 __construct (\Magento\Framework\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Customer\Model\Metadata\FormFactory $formFactory, \Magento\Customer\Api\AddressRepositoryInterface $addressRepository, \Magento\Customer\Api\Data\AddressInterfaceFactory $addressDataFactory, \Magento\Customer\Api\Data\RegionInterfaceFactory $regionDataFactory, \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
 
 dispatch (RequestInterface $request)
 
- Public Member Functions inherited from Action
 __construct (Context $context)
 
 dispatch (RequestInterface $request)
 
 getActionFlag ()
 
- Public Member Functions inherited from AbstractAction
 __construct (Context $context)
 
 dispatch (RequestInterface $request)
 
 getRequest ()
 
 getResponse ()
 
- Public Member Functions inherited from ActionInterface
 execute ()
 

Protected Member Functions

 _getSession ()
 
- Protected Member Functions inherited from Action
 _forward ($action, $controller=null, $module=null, array $params=null)
 
 _redirect ($path, $arguments=[])
 

Protected Attributes

 $_customerSession
 
 $_formKeyValidator
 
 $_addressRepository
 
 $_formFactory
 
 $addressDataFactory
 
 $regionDataFactory
 
 $_dataProcessor
 
 $dataObjectHelper
 
 $resultForwardFactory
 
 $resultPageFactory
 
- Protected Attributes inherited from Action
 $_objectManager
 
 $_sessionNamespace
 
 $_eventManager
 
 $_actionFlag
 
 $_redirect
 
 $_view
 
 $_url
 
 $messageManager
 
- Protected Attributes inherited from AbstractAction
 $_request
 
 $_response
 
 $resultRedirectFactory
 
 $resultFactory
 

Additional Inherited Members

- Data Fields inherited from ActionInterface
const FLAG_NO_DISPATCH = 'no-dispatch'
 
const FLAG_NO_POST_DISPATCH = 'no-postDispatch'
 
const FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch'
 
const PARAM_NAME_BASE64_URL = 'r64'
 
const PARAM_NAME_URL_ENCODED = 'uenc'
 

Detailed Description

Customer address controller

@SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 15 of file Address.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\App\Action\Context  $context,
\Magento\Customer\Model\Session  $customerSession,
\Magento\Framework\Data\Form\FormKey\Validator  $formKeyValidator,
\Magento\Customer\Model\Metadata\FormFactory  $formFactory,
\Magento\Customer\Api\AddressRepositoryInterface  $addressRepository,
\Magento\Customer\Api\Data\AddressInterfaceFactory  $addressDataFactory,
\Magento\Customer\Api\Data\RegionInterfaceFactory  $regionDataFactory,
\Magento\Framework\Reflection\DataObjectProcessor  $dataProcessor,
\Magento\Framework\Api\DataObjectHelper  $dataObjectHelper,
\Magento\Framework\Controller\Result\ForwardFactory  $resultForwardFactory,
\Magento\Framework\View\Result\PageFactory  $resultPageFactory 
)
Parameters
\Magento\Framework\App\Action\Context$context
\Magento\Customer\Model\Session$customerSession
\Magento\Framework\Data\Form\FormKey\Validator$formKeyValidator
\Magento\Customer\Model\Metadata\FormFactory$formFactory
\Magento\Customer\Api\AddressRepositoryInterface$addressRepository
\Magento\Customer\Api\Data\AddressInterfaceFactory$addressDataFactory
\Magento\Customer\Api\Data\RegionInterfaceFactory$regionDataFactory
\Magento\Framework\Reflection\DataObjectProcessor$dataProcessor
\Magento\Framework\Api\DataObjectHelper$dataObjectHelper
\Magento\Framework\Controller\Result\ForwardFactory$resultForwardFactory
\Magento\Framework\View\Result\PageFactory$resultPageFactory@SuppressWarnings(PHPMD.ExcessiveParameterList)

Definition at line 81 of file Address.php.

93  {
94  $this->_customerSession = $customerSession;
95  $this->_formKeyValidator = $formKeyValidator;
96  $this->_formFactory = $formFactory;
97  $this->_addressRepository = $addressRepository;
98  $this->addressDataFactory = $addressDataFactory;
99  $this->regionDataFactory = $regionDataFactory;
100  $this->_dataProcessor = $dataProcessor;
101  $this->dataObjectHelper = $dataObjectHelper;
102  $this->resultForwardFactory = $resultForwardFactory;
103  $this->resultPageFactory = $resultPageFactory;
104  parent::__construct($context);
105  }
$addressRepository

Member Function Documentation

◆ _getSession()

_getSession ( )
protected

Retrieve customer session object

Returns
\Magento\Customer\Model\Session

Definition at line 112 of file Address.php.

113  {
115  }

◆ dispatch()

dispatch ( RequestInterface  $request)

Check customer authentication

Parameters
RequestInterface$request
Returns
\Magento\Framework\App\ResponseInterface

Definition at line 123 of file Address.php.

124  {
125  if (!$this->_getSession()->authenticate()) {
126  $this->_actionFlag->set('', 'no-dispatch', true);
127  }
128  return parent::dispatch($request);
129  }

Field Documentation

◆ $_addressRepository

$_addressRepository
protected

Definition at line 30 of file Address.php.

◆ $_customerSession

$_customerSession
protected

Definition at line 20 of file Address.php.

◆ $_dataProcessor

$_dataProcessor
protected

Definition at line 50 of file Address.php.

◆ $_formFactory

$_formFactory
protected

Definition at line 35 of file Address.php.

◆ $_formKeyValidator

$_formKeyValidator
protected

Definition at line 25 of file Address.php.

◆ $addressDataFactory

$addressDataFactory
protected

Definition at line 40 of file Address.php.

◆ $dataObjectHelper

$dataObjectHelper
protected

Definition at line 55 of file Address.php.

◆ $regionDataFactory

$regionDataFactory
protected

Definition at line 45 of file Address.php.

◆ $resultForwardFactory

$resultForwardFactory
protected

Definition at line 60 of file Address.php.

◆ $resultPageFactory

$resultPageFactory
protected

Definition at line 65 of file Address.php.


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