Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Index Class Reference
Inheritance diagram for Index:
Action AbstractAction ActionInterface Index Post IndexStub

Public Member Functions

 __construct (Context $context, ConfigInterface $contactsConfig)
 
 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 ()
 

Data Fields

const XML_PATH_EMAIL_RECIPIENT = ConfigInterface::XML_PATH_EMAIL_RECIPIENT
 
const XML_PATH_EMAIL_SENDER = ConfigInterface::XML_PATH_EMAIL_SENDER
 
const XML_PATH_EMAIL_TEMPLATE = ConfigInterface::XML_PATH_EMAIL_TEMPLATE
 
const XML_PATH_ENABLED = ConfigInterface::XML_PATH_ENABLED
 
- 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'
 

Additional Inherited Members

- Protected Member Functions inherited from Action
 _forward ($action, $controller=null, $module=null, array $params=null)
 
 _redirect ($path, $arguments=[])
 
- Protected Attributes inherited from Action
 $_objectManager
 
 $_sessionNamespace
 
 $_eventManager
 
 $_actionFlag
 
 $_redirect
 
 $_view
 
 $_url
 
 $messageManager
 
- Protected Attributes inherited from AbstractAction
 $_request
 
 $_response
 
 $resultRedirectFactory
 
 $resultFactory
 

Detailed Description

Contact module base controller

Definition at line 16 of file Index.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Context  $context,
ConfigInterface  $contactsConfig 
)
Parameters
Context$context
ConfigInterface$contactsConfig

Definition at line 47 of file Index.php.

50  {
51  parent::__construct($context);
52  $this->contactsConfig = $contactsConfig;
53  }

Member Function Documentation

◆ dispatch()

dispatch ( RequestInterface  $request)

Dispatch request

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

Definition at line 62 of file Index.php.

63  {
64  if (!$this->contactsConfig->isEnabled()) {
65  throw new NotFoundException(__('Page not found.'));
66  }
67  return parent::dispatch($request);
68  }
__()
Definition: __.php:13

Field Documentation

◆ XML_PATH_EMAIL_RECIPIENT

const XML_PATH_EMAIL_RECIPIENT = ConfigInterface::XML_PATH_EMAIL_RECIPIENT

Recipient email config path

Definition at line 21 of file Index.php.

◆ XML_PATH_EMAIL_SENDER

const XML_PATH_EMAIL_SENDER = ConfigInterface::XML_PATH_EMAIL_SENDER

Sender email config path

Definition at line 26 of file Index.php.

◆ XML_PATH_EMAIL_TEMPLATE

const XML_PATH_EMAIL_TEMPLATE = ConfigInterface::XML_PATH_EMAIL_TEMPLATE

Email template config path

Definition at line 31 of file Index.php.

◆ XML_PATH_ENABLED

const XML_PATH_ENABLED = ConfigInterface::XML_PATH_ENABLED

Enabled config path

Definition at line 36 of file Index.php.


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