Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Themes.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Deploy\Source;
7 
9 use Magento\Deploy\Package\PackageFileFactory;
10 
14 class Themes implements SourceInterface
15 {
19  const TYPE = 'themes';
20 
24  private $filesUtil;
25 
29  private $packageFileFactory;
30 
37  public function __construct(
38  Files $filesUtil,
39  PackageFileFactory $packageFileFactory
40  ) {
41  $this->filesUtil = $filesUtil;
42  $this->packageFileFactory = $packageFileFactory;
43  }
44 
48  public function get()
49  {
50  $files = [];
51  foreach ($this->filesUtil->getStaticPreProcessingFiles() as $info) {
52  list($area, $theme, $locale, $module, $fileName, $fullPath) = $info;
53  if (!empty($theme)) {
54  $locale = $locale ?: null;
55  $params = [
56  'area' => $area,
57  'theme' => $theme,
58  'locale' => $locale,
59  'module' => $module,
60  'fileName' => $fileName,
61  'sourcePath' => $fullPath
62  ];
63  $files[] = $this->packageFileFactory->create($params);
64  }
65  }
66  return $files;
67  }
68 }
$fileName
Definition: translate.phtml:15
$theme
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52
__construct(Files $filesUtil, PackageFileFactory $packageFileFactory)
Definition: Themes.php:37
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18
foreach($appDirs as $dir) $files