Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (ScopeConfigInterface $scopeConfig, State $appState, $scope='store') | |
isEnabled ($contentType) | |
addMinifiedSign ($filename) | |
removeMinifiedSign ($filename) | |
isMinifiedFilename ($filename) | |
isExcluded ($filename) | |
getExcludes ($contentType) | |
Data Fields | |
const | XML_PATH_MINIFICATION_ENABLED = 'dev/%s/minify_files' |
const | XML_PATH_MINIFICATION_EXCLUDES = 'dev/%s/minify_exclude' |
Helper class for static files minification related processes. @api
Definition at line 16 of file Minification.php.
__construct | ( | ScopeConfigInterface | $scopeConfig, |
State | $appState, | ||
$scope = 'store' |
|||
) |
ScopeConfigInterface | $scopeConfig | |
State | $appState | |
string | $scope |
Definition at line 50 of file Minification.php.
addMinifiedSign | ( | $filename | ) |
Add 'min' suffix if minification is enabled and $filename has no one.
string | $filename |
Definition at line 83 of file Minification.php.
getExcludes | ( | $contentType | ) |
string | $contentType |
Definition at line 142 of file Minification.php.
isEnabled | ( | $contentType | ) |
Check whether asset minification is on for specified content type
string | $contentType |
Definition at line 63 of file Minification.php.
isExcluded | ( | $filename | ) |
string | $filename |
Definition at line 128 of file Minification.php.
isMinifiedFilename | ( | $filename | ) |
removeMinifiedSign | ( | $filename | ) |
Remove 'min' suffix if exists and minification is enabled
string | $filename |
Definition at line 102 of file Minification.php.
const XML_PATH_MINIFICATION_ENABLED = 'dev/%s/minify_files' |
XML path for asset minification configuration
Definition at line 21 of file Minification.php.
const XML_PATH_MINIFICATION_EXCLUDES = 'dev/%s/minify_exclude' |
Definition at line 23 of file Minification.php.