public function GatherContentMigrateSource::count in GatherContent 8.5
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 SourcePluginBase::count
File
- src/
Plugin/ migrate/ source/ GatherContentMigrateSource.php, line 119
Class
- GatherContentMigrateSource
- A source class for Gathercontent API.
Namespace
Drupal\gathercontent\Plugin\migrate\sourceCode
public function count($refresh = FALSE) {
return count($this
->getItems());
}