You are here

public function ViewMode::count in Zircon Profile 8

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

Get 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: Whether or not to refresh the count.

Return value

int The count.

Overrides SqlBase::count

File

core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php, line 73
Contains \Drupal\field\Plugin\migrate\source\d7\ViewMode.

Class

ViewMode
Plugin annotation @MigrateSource( id = "d7_view_mode" )

Namespace

Drupal\field\Plugin\migrate\source\d7

Code

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