function ContentEntity::count

Same name in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity::count()
  2. 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity::count()
  3. 11.x core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity::count()

Overrides SourcePluginBase::count

File

core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php, line 245

Class

ContentEntity
Source plugin to get content entities from the current version of Drupal.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

public function count($refresh = FALSE) {
    // If no translations are included, then a simple query is possible.
    if (!$this->configuration['include_translations']) {
        return parent::count($refresh);
    }
    // @todo Determine a better way to retrieve a valid count for translations.
    //   https://www.drupal.org/project/drupal/issues/2937166
    return MigrateSourceInterface::NOT_COUNTABLE;
}

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