public function CacheableEmbeddedDataSource::count in Drupal 9
Gets the source count.
Return a count of available source records, from the cache if appropriate. Returns MigrateSourceInterface::NOT_COUNTABLE 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 EmbeddedDataSource::count
File
- core/
modules/ migrate/ tests/ modules/ migrate_cache_counts_test/ src/ Plugin/ migrate/ source/ CacheableEmbeddedDataSource.php, line 21
Class
- CacheableEmbeddedDataSource
- A copy of embedded_data which allows caching the count.
Namespace
Drupal\migrate_cache_counts_test\Plugin\migrate\sourceCode
public function count($refresh = FALSE) {
return SourcePluginBase::count($refresh);
}