/**
  * Retrieve package area
  *
  * @return string
  */
 public function getArea()
 {
     // In order to support environment emulation of area, if area is set, return it
     if ($this->_area && !$this->_appState->isAreaCodeEmulated()) {
         return $this->_area;
     }
     return $this->_appState->getAreaCode();
 }
예제 #2
0
 /**
  * Used to test whether the isAreaCodeEmulated method returns true within an emulated context
  *
  * @return bool
  */
 public function isAreaCodeEmulatedCallback()
 {
     return $this->model->isAreaCodeEmulated();
 }
예제 #3
0
 /**
  * @param \Magento\Framework\Mail\TransportInterface $subject
  * @param \Closure $proceed
  * @return mixed
  */
 public function aroundSendMessage(\Magento\Framework\Mail\TransportInterface $subject, \Closure $proceed)
 {
     return $this->appState->isAreaCodeEmulated() ? null : $proceed();
 }