function SqlBase::doCount

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/source/SqlBase.php \Drupal\migrate\Plugin\migrate\source\SqlBase::doCount()
  2. 11.x core/modules/migrate/src/Plugin/migrate/source/SqlBase.php \Drupal\migrate\Plugin\migrate\source\SqlBase::doCount()

Gets the source count using countQuery().

Overrides SourcePluginBase::doCount

6 methods override SqlBase::doCount()
EntityTranslationSettings::doCount in core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php
Gets the source count using countQuery().
FieldInstance::doCount in core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
Gets the source count using countQuery().
Variable::doCount in core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
Gets the source count using countQuery().
VariableTranslation::doCount in core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php
Gets the source count using countQuery().
VariableTranslation::doCount in core/modules/migrate_drupal/src/Plugin/migrate/source/d7/VariableTranslation.php
Gets the source count using countQuery().

... See full list

File

core/modules/migrate/src/Plugin/migrate/source/SqlBase.php, line 393

Class

SqlBase
Sources whose data may be fetched via a database connection.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

protected function doCount() {
    return (int) $this->query()
        ->countQuery()
        ->execute()
        ->fetchField();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.