You are here

public function EmbeddedDataSource::count in Drupal 10

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

Overrides SourcePluginBase::count

2 calls to EmbeddedDataSource::count()
CacheableEmbeddedDataSource::doCount in core/modules/migrate/tests/modules/migrate_cache_counts_test/src/Plugin/migrate/source/CacheableEmbeddedDataSource.php
Gets the source count checking if the source is countable or using the iterator_count function.
EmbeddedDataSource::fields in core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php
Returns available fields on the source.
1 method overrides EmbeddedDataSource::count()
CacheableEmbeddedDataSource::count in core/modules/migrate/tests/modules/migrate_cache_counts_test/src/Plugin/migrate/source/CacheableEmbeddedDataSource.php

File

core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php, line 117

Class

EmbeddedDataSource
Allows source data to be defined in the configuration of the source plugin.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function count($refresh = FALSE) {

  // We do not want this source plugin to have a cacheable count.
  // @see \Drupal\migrate_cache_counts_test\Plugin\migrate\source\CacheableEmbeddedDataSource
  return count($this->dataRows);
}