public function ViewModeBase::count in Drupal 9
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php \Drupal\node\Plugin\migrate\source\d6\ViewModeBase::count()
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 SourcePluginBase::count
File
- core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ ViewModeBase.php, line 15
Class
- ViewModeBase
- A base class for migrations that require view mode info.
Namespace
Drupal\node\Plugin\migrate\source\d6Code
public function count($refresh = FALSE) {
return count($this
->initializeIterator());
}