You are here

public function SearchPage::count in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php \Drupal\search\Plugin\migrate\source\d7\SearchPage::count()

Gets the source count.

Return a count of available source records, from the cache if appropriate. Returns -1 if the source is not countable.

Parameters

bool $refresh: (optional) Whether or not to refresh the count. Defaults to FALSE. Not all implementations support the reset flag. In such instances this parameter is ignored and the result of calling the method will always be up to date.

Return value

int The count.

Overrides Variable::count

File

core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php, line 70

Class

SearchPage
Get search_active_modules and rankings for core modules.

Namespace

Drupal\search\Plugin\migrate\source\d7

Code

public function count($refresh = FALSE) {
  return $this
    ->initializeIterator()
    ->count();
}