|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\View\Design\FileResolution\Fallback\File $fallbackFile, \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile $fallbackTemplateFile, \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile $fallbackLocaleFile, \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallbackStaticFile, \Magento\Framework\View\Design\FileResolution\Fallback\EmailTemplateFile $fallbackEmailTemplateFile, \Magento\Framework\View\Asset\Repository $assetRepo) | |
| getFilename ($fileId, array $params=[]) | |
| getLocaleFileName ($file, array $params=[]) | |
| getTemplateFileName ($fileId, array $params=[]) | |
| getStaticFileName ($fileId, array $params=[]) | |
| getEmailTemplateFileName ($fileId, array $params, $module) | |
Static Public Member Functions | |
| static | normalizePath ($path) |
| static | offsetPath ($relatedPath, $path) |
| static | getRelatedPath ($relativeTo, $path) |
Protected Attributes | |
| $_fileResolution | |
| $_templateFileResolution | |
| $_localeFileResolution | |
| $_staticFileResolution | |
| $_emailTemplateFileResolution | |
| $_assetRepo | |
Model that finds file paths by their fileId
@api
Definition at line 14 of file FileSystem.php.
| __construct | ( | \Magento\Framework\View\Design\FileResolution\Fallback\File | $fallbackFile, |
| \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile | $fallbackTemplateFile, | ||
| \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile | $fallbackLocaleFile, | ||
| \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile | $fallbackStaticFile, | ||
| \Magento\Framework\View\Design\FileResolution\Fallback\EmailTemplateFile | $fallbackEmailTemplateFile, | ||
| \Magento\Framework\View\Asset\Repository | $assetRepo | ||
| ) |
Constructor
| \Magento\Framework\View\Design\FileResolution\Fallback\File | $fallbackFile | |
| \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile | $fallbackTemplateFile | |
| \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile | $fallbackLocaleFile | |
| \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile | $fallbackStaticFile | |
| \Magento\Framework\View\Design\FileResolution\Fallback\EmailTemplateFile | $fallbackEmailTemplateFile | |
| \Magento\Framework\View\Asset\Repository | $assetRepo |
Definition at line 58 of file FileSystem.php.
| getEmailTemplateFileName | ( | $fileId, | |
| array | $params, | ||
| $module | |||
| ) |
Get an email template file
| string | $fileId | |
| array | $params | |
| string | $module |
Definition at line 157 of file FileSystem.php.
| getFilename | ( | $fileId, | |
| array | $params = [] |
||
| ) |
Get existing file name with fallback to default
| string | $fileId | |
| array | $params |
Definition at line 81 of file FileSystem.php.
| getLocaleFileName | ( | $file, | |
| array | $params = [] |
||
| ) |
Get a locale file
| string | $file | |
| array | $params |
Definition at line 102 of file FileSystem.php.
|
static |
Concatenate/normalize a path to another path as a relative, assuming it will be relative to its directory
| string | $relativeTo | |
| string | $path |
Definition at line 230 of file FileSystem.php.
| getStaticFileName | ( | $fileId, | |
| array | $params = [] |
||
| ) |
Find a static view file using fallback mechanism
| string | $fileId | |
| array | $params |
Definition at line 136 of file FileSystem.php.
| getTemplateFileName | ( | $fileId, | |
| array | $params = [] |
||
| ) |
Get a template file
| string | $fileId | |
| array | $params |
Definition at line 116 of file FileSystem.php.
|
static |
Remove excessive "." and ".." parts from a path
For example foo/bar/../file.ext -> foo/file.ext
| string | $path |
Definition at line 172 of file FileSystem.php.
|
static |
Get a relative path between $relatedPath and $path paths as if $path was to refer to $relatedPath relatively of itself
Returns new calculated relative path. Examples: $path: /some/directory/one/file.ext $relatedPath: /some/directory/two/another/file.ext Result: ../two/another
$path: http://example.com/themes/demo/css/styles.css $relatedPath: http://example.com/images/logo.gif Result: ../../../images
| string | $relatedPath | |
| string | $path |
Definition at line 209 of file FileSystem.php.
|
protected |
Definition at line 46 of file FileSystem.php.
|
protected |
Definition at line 39 of file FileSystem.php.
|
protected |
Definition at line 19 of file FileSystem.php.
|
protected |
Definition at line 29 of file FileSystem.php.
|
protected |
Definition at line 34 of file FileSystem.php.
|
protected |
Definition at line 24 of file FileSystem.php.