Scan the filesystem for missing files and removee from database.
Fichier
-
src/
State/ State.php, line 53
Classe
- State
- Provides AdvAgg State interfaces with a few extra commands.
Namespace
Drupal\advagg\StateCode
public function clearMissingFiles() {
$removed = [];
$values = $this->getAll();
if (empty($values)) {
return $removed;
}
if ($this->pathColumn) {
$values = array_column($values, NULL, $this->pathColumn);
}
foreach ($values as $path => $details) {
if (!file_exists($path)) {
$removed[$path] = $values[$path];
$this->delete($path);
}
}
return $removed;
}