Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Variable.php

function Variable::doCount

Overrides SqlBase::doCount

1 method overrides Variable::doCount()
SearchPage::doCount in core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php
Gets the source count using countQuery().

File

core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php, line 138

Class

Variable
Drupal 6/7 variable source from database.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

protected function doCount() {
    if (empty($this->variablesNoRowIfMissing)) {
        return 1;
    }
    $variable_names = array_keys($this->query()
        ->execute()
        ->fetchAllAssoc('name'));
    if (!empty(array_diff($this->variablesNoRowIfMissing, $variable_names))) {
        return 0;
    }
    return 1;
}
RSS feed
Powered by Drupal