You are here

protected function DrupalSqlBase::moduleExists in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::moduleExists()
  2. 10 core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::moduleExists()

Checks if a given module is enabled in the source Drupal database.

Parameters

string $module: Name of module to check.

Return value

bool TRUE if module is enabled on the origin system, FALSE if not.

17 calls to DrupalSqlBase::moduleExists()
Comment::prepareRow in core/modules/comment/src/Plugin/migrate/source/d7/Comment.php
Adds additional data to the row.
CommentEntityTranslation::prepareRow in core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php
Adds additional data to the row.
DrupalSqlBase::checkRequirements in core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
Checks if requirements for this plugin are OK.
Field::query in core/modules/field/src/Plugin/migrate/source/d7/Field.php
FieldInstance::query in core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php

... See full list

File

core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php, line 151

Class

DrupalSqlBase
A base class for source plugins using a Drupal database as a source.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

protected function moduleExists($module) {
  $system_data = $this
    ->getSystemData();
  return !empty($system_data['module'][$module]['status']);
}