Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
7 
12 
17 {
22 
27 
32 
37 
41  private $contactsConfig;
42 
47  public function __construct(
48  Context $context,
49  ConfigInterface $contactsConfig
50  ) {
51  parent::__construct($context);
52  $this->contactsConfig = $contactsConfig;
53  }
54 
63  {
64  if (!$this->contactsConfig->isEnabled()) {
65  throw new NotFoundException(__('Page not found.'));
66  }
67  return parent::dispatch($request);
68  }
69 }
__()
Definition: __.php:13
dispatch(RequestInterface $request)
Definition: Index.php:62
__construct(Context $context, ConfigInterface $contactsConfig)
Definition: Index.php:47