public static function HostQuery::countExpiredHosts in http:BL 8
Implemented in HostQuery.
Overrides Host::countExpiredHosts
1 call to HostQuery::countExpiredHosts()
- httpbl_cron in ./
httpbl.module - Implements hook_cron().
File
- src/
HostQuery.php, line 40 - Contains \Drupal\httpbl\HostQuery.
Class
Namespace
Drupal\httpblCode
public static function countExpiredHosts($now) {
$query = \Drupal::entityQuery('host');
$query
->condition('expire', $now, '<=');
$count = $query
->count()
->execute();
return $count;
}