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

Breadcrumb

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

function 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');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal