You are here

public static function GenerateBatch::count in File Hash 8

Returns count of files in file_managed table.

Return value

int The count of managed files.

2 calls to GenerateBatch::count()
FileHashGenerateForm::getDescription in src/Form/FileHashGenerateForm.php
Returns additional text to display as a description.
GenerateBatch::process in src/Batch/GenerateBatch.php
Batch process callback.

File

src/Batch/GenerateBatch.php, line 35

Class

GenerateBatch
Generates file hashes in bulk.

Namespace

Drupal\filehash\Batch

Code

public static function count() {
  return \Drupal::database()
    ->query('SELECT COUNT(*) FROM {file_managed}')
    ->fetchField();
}