Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Modules Class Reference
Inheritance diagram for Modules:
SourceInterface

Public Member Functions

 __construct (Files $filesUtil, PackageFileFactory $packageFileFactory)
 
 get ()
 

Data Fields

const TYPE = 'modules'
 

Detailed Description

Collect files eligible for deployment from modules

Definition at line 14 of file Modules.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Files  $filesUtil,
PackageFileFactory  $packageFileFactory 
)

Modules constructor

Parameters
Files$filesUtil
PackageFileFactory$packageFileFactory

Definition at line 34 of file Modules.php.

37  {
38  $this->filesUtil = $filesUtil;
39  $this->packageFileFactory = $packageFileFactory;
40  }

Member Function Documentation

◆ get()

get ( )

Return the list of files located in source

Returns
PackageFile[]

Implements SourceInterface.

Definition at line 45 of file Modules.php.

46  {
47  $files = [];
48  foreach ($this->filesUtil->getStaticPreProcessingFiles() as $info) {
49  list($area, $theme, $locale, $module, $fileName, $fullPath) = $info;
50  if (!empty($module) && empty($theme)) {
51  $locale = $locale ?: null;
52  $params = [
53  'area' => $area,
54  'theme' => null,
55  'locale' => $locale,
56  'module' => $module,
57  'fileName' => $fileName,
58  'sourcePath' => $fullPath
59  ];
60  $files[] = $this->packageFileFactory->create($params);
61  }
62  }
63  return $files;
64  }
$fileName
Definition: translate.phtml:15
$theme
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18
foreach($appDirs as $dir) $files

Field Documentation

◆ TYPE

const TYPE = 'modules'

Definition at line 16 of file Modules.php.


The documentation for this class was generated from the following file: