public function MigrateSourceReference::computeCount in Relation 7
Same name and namespace in other branches
- 8.2 relation_migrate/relation_migrate.source.inc \MigrateSourceReference::computeCount()
- 8 relation_migrate/relation_migrate.source.inc \MigrateSourceReference::computeCount()
Return the number of available source records.
File
- relation_migrate/
relation_migrate.source.inc, line 70 - Source plugin for *reference fields.
Class
- MigrateSourceReference
- Migration source for *ference field. This source is primary used in relation_migrate to convert *reference entries into relation entities.
Code
public function computeCount() {
$rows_count = 0;
foreach ($this->fields as $field_name) {
$rows_count += db_query('SELECT count(*) FROM {field_data_' . $field_name . '} WHERE deleted = 0')
->fetchField();
}
return $rows_count;
}