Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\UrlInterface $baseUrl, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\View\Design\Theme\ListInterface $themeList, \Magento\Framework\View\Asset\Source $assetSource, \Magento\Framework\App\Request\Http $request, FileFactory $fileFactory, File\FallbackContextFactory $fallbackContextFactory, File\ContextFactory $contextFactory, RemoteFactory $remoteFactory) | |
updateDesignParams (array &$params) | |
createAsset ($fileId, array $params=[]) | |
getStaticViewFileContext () | |
createSimilar ($fileId, LocalInterface $similarTo) | |
createArbitrary ( $filePath, $dirPath, $baseDirType=DirectoryList::STATIC_VIEW, $baseUrlType=UrlInterface::URL_TYPE_STATIC) | |
createRelated ($fileId, LocalInterface $relativeTo) | |
createRemoteAsset ($url, $contentType) | |
getUrl ($fileId) | |
getUrlWithParams ($fileId, array $params) | |
Static Public Member Functions | |
static | extractModule ($fileId) |
Data Fields | |
const | FILE_ID_SEPARATOR = '::' |
A repository service for view assets @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@api
Definition at line 21 of file Repository.php.
__construct | ( | \Magento\Framework\UrlInterface | $baseUrl, |
\Magento\Framework\View\DesignInterface | $design, | ||
\Magento\Framework\View\Design\Theme\ListInterface | $themeList, | ||
\Magento\Framework\View\Asset\Source | $assetSource, | ||
\Magento\Framework\App\Request\Http | $request, | ||
FileFactory | $fileFactory, | ||
File\FallbackContextFactory | $fallbackContextFactory, | ||
File\ContextFactory | $contextFactory, | ||
RemoteFactory | $remoteFactory | ||
) |
\Magento\Framework\UrlInterface | $baseUrl | |
\Magento\Framework\View\DesignInterface | $design | |
\Magento\Framework\View\Design\Theme\ListInterface | $themeList | |
\Magento\Framework\View\Asset\Source | $assetSource | |
\Magento\Framework\App\Request\Http | $request | |
FileFactory | $fileFactory | |
File\FallbackContextFactory | $fallbackContextFactory | |
File\ContextFactory | $contextFactory | |
RemoteFactory | $remoteFactory |
Definition at line 100 of file Repository.php.
createArbitrary | ( | $filePath, | |
$dirPath, | |||
$baseDirType = DirectoryList::STATIC_VIEW , |
|||
$baseUrlType = UrlInterface::URL_TYPE_STATIC |
|||
) |
Create a file asset with an arbitrary path
This kind of file is not subject of fallback system Client code is responsible for ensuring that the file is in specified directory
string | $filePath | |
string | $dirPath | |
string | $baseDirType | |
string | $baseUrlType |
Definition at line 323 of file Repository.php.
createAsset | ( | $fileId, | |
array | $params = [] |
||
) |
Create a file asset that's subject of fallback system
string | $fileId | |
array | $params |
Definition at line 201 of file Repository.php.
createRelated | ( | $fileId, | |
LocalInterface | $relativeTo | ||
) |
Create a file asset with path relative to specified local asset
string | $fileId | |
LocalInterface | $relativeTo |
Definition at line 371 of file Repository.php.
createRemoteAsset | ( | $url, | |
$contentType | |||
) |
Create a remote asset value object
string | $url | |
string | $contentType |
Definition at line 389 of file Repository.php.
createSimilar | ( | $fileId, | |
LocalInterface | $similarTo | ||
) |
Create a file asset similar to an existing local asset by using its context
string | $fileId | |
LocalInterface | $similarTo |
Definition at line 294 of file Repository.php.
|
static |
Extract module name from specified file ID
string | $fileId |
Definition at line 429 of file Repository.php.
getStaticViewFileContext | ( | ) |
Get current context for static view files
Definition at line 241 of file Repository.php.
getUrl | ( | $fileId | ) |
Getter for static view file URL
string | $fileId |
Definition at line 400 of file Repository.php.
getUrlWithParams | ( | $fileId, | |
array | $params | ||
) |
A getter for static view file URL with special parameters
To omit parameters and have them automatically determined from application state, use getUrl()
string | $fileId | |
array | $params |
Definition at line 416 of file Repository.php.
updateDesignParams | ( | array & | $params | ) |
Update required parameters with default values if custom not specified
array | &$params |
Definition at line 131 of file Repository.php.
const FILE_ID_SEPARATOR = '::' |
Scope separator for module notation of file ID
Definition at line 26 of file Repository.php.