if ($this->filterManager->
hasDefinition($plugin_id)) { return $plugin_id;
} else { if (in_array(static::
getSourceFilterType($value),
[FilterInterface::TYPE_TRANSFORM_REVERSIBLE, FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE
], TRUE
)) { $message =
sprintf('Filter %s could not be mapped to an existing filter plugin; omitted since it is a transformation-only filter. Install and configure a successor after the migration.',
$plugin_id);
$migrate_executable->
saveMessage($message, MigrationInterface::MESSAGE_INFORMATIONAL
);
throw new MigrateSkipProcessException("The transformation-only filter
$plugin_id was skipped."
);
} $fallback =
$this->filterManager->
getFallbackPluginId($plugin_id);
// @see \Drupal\filter\Plugin\migrate\process\FilterSettings::transform()
$message =
sprintf('Filter %s could not be mapped to an existing filter plugin; defaulting to %s and dropping all settings. Either redo the migration with the module installed that provides an equivalent filter, or modify the text format after the migration to remove this filter if it is no longer necessary.',
$plugin_id,
$fallback);
$migrate_executable->
saveMessage($message, MigrationInterface::MESSAGE_WARNING
);
return $fallback;
} } /**
* Gets the Drupal 8 filter type for a Drupal 7 filter.
*
* @param string $filter_id
* A Drupal 7 filter ID.
*
* @return int
* One of:
* - FilterInterface::TYPE_MARKUP_LANGUAGE
* - FilterInterface::TYPE_HTML_RESTRICTOR
* - FilterInterface::TYPE_TRANSFORM_REVERSIBLE
* - FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE
*
* @see \Drupal\filter\Plugin\FilterInterface::getType()
*/