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

Breadcrumb

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

function EntitySearchPage::import

Overrides EntityConfigBase::import

File

core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php, line 80

Class

EntitySearchPage
Migrate destination for search page.

Namespace

Drupal\search\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = []) {
    // The search page settings may be for a module not enabled on the
    // destination so make sure it is enabled for updating search page settings.
    if ($this->moduleHandler
        ->moduleExists($row->getDestinationProperty('module'))) {
        return parent::import($row, $old_destination_id_values);
    }
    $msg = sprintf("Search module '%s' is not enabled on this site.", $row->getDestinationProperty('module'));
    throw new MigrateException($msg, 0, NULL, MigrationInterface::MESSAGE_INFORMATIONAL, MigrateIdMapInterface::STATUS_IGNORED);
}

API Navigation

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