1 call to Files::get()
Files::getMultiple dans src/State/Files.php

Fichier

src/State/Files.php, line 221

Classe

Files
Provides AdvAgg with a file status state system using a key value store.

Namespace

Drupal\advagg\State

Code

public function get($key, $default = NULL) {
    // https://api.drupal.org/api/drupal/core!lib!Drupal!Core!State!State.php/function/State::get/8.3.x
    // Passthrough for Drupal 8.3+.
    if (version_compare(\Drupal::VERSION, '8.3.0') >= 0) {
        return parent::get($key, $default);
    }
    // https://api.drupal.org/api/drupal/core!lib!Drupal!Core!State!State.php/function/State::get/8.2.x
    // Use State::getMultiple vs Files::getMultiple for older Drupal 8 versions.
    $values = parent::getMultiple([
        $key,
    ]);
    return isset($values[$key]) ? $values[$key] : $default;
}