Same name and namespace in other branches
- 5.0.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::__construct()
- 6.0.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::__construct()
- 8.x-3.x advagg_ext_minify/src/Asset/Minifier.php \Drupal\advagg_ext_minify\Asset\Minifier::__construct()
Construct the optimizer instance.
Parameters
string $root: Gets the app root.
\Psr\Log\LoggerInterface $logger: The logger service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.
\Drupal\Core\File\FileSystemInterface $file: The filesystem service.
Overrides SingleAssetOptimizerBase::__construct
File
-
advagg_ext_minify/
src/ Asset/ Minifier.php, line 55
Class
- Minifier
- Optimizes a asset via external minifiers.
Namespace
Drupal\advagg_ext_minify\AssetCode
public function __construct(string $root, LoggerInterface $logger, ConfigFactoryInterface $config_factory, FileSystemInterface $file) {
parent::__construct($logger);
$this->config = $config_factory->get('advagg_ext_minify.settings');
$this->file = $file;
$this->in = $file->realpath($file->tempnam('public://js/optimized', 'advagg_in'));
$this->out = $file->realpath($file->tempnam('public://js/optimized', 'advagg_out'));
$this->root = $root;
}