function search_by_page_search_status in Search by Page 8
Same name and namespace in other branches
- 7 search_by_page.module \search_by_page_search_status()
Implements hook_search_status().
File
- ./
search_by_page.module, line 437 - Main module file for Drupal module Search by Page.
Code
function search_by_page_search_status() {
// Tell Search module how many items have been indexed, and how many not
$total = \Drupal::database()
->query('SELECT COUNT(*) FROM {search_by_page_path}')
->fetchField();
$remain = \Drupal::database()
->query('SELECT COUNT(*) FROM {search_by_page_path} p WHERE p.last_index_time = 0')
->fetchField();
return [
'remaining' => $remain,
'total' => $total,
];
}