Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PathInfoProcessor.php
Go to the documentation of this file.
1 <?php
9 
15 {
19  private $_helper;
20 
24  private $_subject;
25 
30  public function __construct(
31  \Magento\Store\App\Request\PathInfoProcessor $subject,
32  \Magento\Backend\Helper\Data $helper
33  ) {
34  $this->_helper = $helper;
35  $this->_subject = $subject;
36  }
37 
45  public function process(\Magento\Framework\App\RequestInterface $request, $pathInfo)
46  {
47  $pathParts = explode('/', ltrim($pathInfo, '/'), 2);
48  $firstPart = $pathParts[0];
49 
50  if ($firstPart != $this->_helper->getAreaFrontName()) {
51  return $this->_subject->process($request, $pathInfo);
52  }
53  return $pathInfo;
54  }
55 }
$helper
Definition: iframe.phtml:13
__construct(\Magento\Store\App\Request\PathInfoProcessor $subject, \Magento\Backend\Helper\Data $helper)
process(\Magento\Framework\App\RequestInterface $request, $pathInfo)