Exemplo n.º 1
0
 /**
  * Get a file context value object
  *
  * Same instance per set of parameters
  *
  * @param string $baseDirType
  * @param string $urlType
  * @param string $dirPath
  * @return \Magento\Framework\View\Asset\File\Context
  */
 private function getFileContext($baseDirType, $urlType, $dirPath)
 {
     $id = implode('|', [$baseDirType, $urlType, $dirPath]);
     if (!isset($this->fileContext[$id])) {
         $url = $this->baseUrl->getBaseUrl(['_type' => $urlType]);
         $this->fileContext[$id] = $this->contextFactory->create(['baseUrl' => $url, 'baseDirType' => $baseDirType, 'contextPath' => $dirPath]);
     }
     return $this->fileContext[$id];
 }