Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Customer.php
Go to the documentation of this file.
1 <?php
7 
12 
16 abstract class Customer extends Action
17 {
23  protected $customerSession;
24 
29  public function __construct(
30  Context $context,
32  ) {
33  $this->customerSession = $customerSession;
34  parent::__construct($context);
35  }
36 
44  {
45  if (!$this->customerSession->authenticate()) {
46  $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true);
47  }
48  return parent::dispatch($request);
49  }
50 }
dispatch(RequestInterface $request)
Definition: Customer.php:43
__construct(Context $context, Session $customerSession)
Definition: Customer.php:29