function CommentEntityTranslation::checkRequirements

Same name in other branches
  1. 9 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::checkRequirements()
  2. 10 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::checkRequirements()

Overrides DrupalSqlBase::checkRequirements

File

core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php, line 112

Class

CommentEntityTranslation
Drupal 7 comment entity translation source plugin.

Namespace

Drupal\comment\Plugin\migrate\source\d7

Code

public function checkRequirements() {
    parent::checkRequirements();
    if (!$this->moduleExists('comment')) {
        // If we make it to here, the comment module isn't installed.
        throw new RequirementsException('The module comment is not enabled in the source site');
    }
    if (!$this->moduleExists('node')) {
        // Node module is also a requirement.
        throw new RequirementsException('The module node is not enabled in the source site');
    }
}

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