Same name and namespace in other branches
  1. 5.0.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo() 1 commentaire
  2. 8.x-2.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo() 1 commentaire
  3. 8.x-3.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo() 1 commentaire
  4. 8.x-4.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfo() 1 commentaire

Get detailed info about the given filename.

Paramètres

string $filename: Name of file to lookup.

Return value

string Detailed info about this file.

1 call to InfoForm::getFileInfo()
InfoForm::getFileInfoSubmit dans src/Form/InfoForm.php
Display file info in a drupal message.

Fichier

src/Form/InfoForm.php, line 218

Classe

InfoForm
View AdvAgg information for this site.

Namespace

Drupal\advagg\Form

Code

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.');
}