Same name in other branches
- 5.0.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo()
- 6.0.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo()
- 8.x-2.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo()
- 8.x-4.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo()
Get detailed info about the given filename.
Parameters
string $filename: Name of file to lookup.
Return value
string Detailed info about this file.
1 call to InfoForm::getFileInfo()
- InfoForm::getFileInfoSubmit in src/
Form/ InfoForm.php - Display file info in a drupal message.
File
-
src/
Form/ InfoForm.php, line 268
Class
- InfoForm
- View AdvAgg information for this site.
Namespace
Drupal\advagg\FormCode
private function getFileInfo($filename) {
if (substr_compare($filename, 'css_', 0) || substr_compare($filename, 'js_', 0)) {
$cid = str_replace([
'css_',
'js_',
'.css',
'.js',
], '', $filename);
$cid = substr($cid, 0, strpos($cid, '.'));
if ($cached = $this->cache
->get($cid, TRUE)) {
return print_r($cached->data, TRUE);
}
}
return $this->t('Optimized file information not found, confirm spelling of the path. Alternatively, that could be an outdated file.');
}