You are here

protected function DomMigrationLookup::doReplace in Migrate Plus 8.5

Retrieves the right replace string based on configuration.

Parameters

\DOMElement $html_node: The current element from iteration.

string $search: The search string or pattern.

string $replace: The replacement string.

string $subject: The string on which to perform the substitution.

Overrides DomStrReplace::doReplace

1 call to DomMigrationLookup::doReplace()
DomMigrationLookup::transform in src/Plugin/migrate/process/DomMigrationLookup.php
Performs the associated process.

File

src/Plugin/migrate/process/DomMigrationLookup.php, line 191

Class

DomMigrationLookup
String replacements on a source dom based on migration lookup.

Namespace

Drupal\migrate_plus\Plugin\migrate\process

Code

protected function doReplace(\DOMElement $html_node, $search, $replace, $subject) {
  $new_subject = preg_replace($search, $replace, $subject);
  $this
    ->postReplace($html_node, $new_subject);
}