protected function DomStrReplace::postReplace in Migrate Plus 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/migrate/process/DomStrReplace.php \Drupal\migrate_plus\Plugin\migrate\process\DomStrReplace::postReplace()
Performs post-replace actions.
Parameters
\DOMElement $html_node: The current element from iteration.
string $new_subject: The new value to use.
1 call to DomStrReplace::postReplace()
- DomStrReplace::doReplace in src/
Plugin/ migrate/ process/ DomStrReplace.php - Retrieves the right replace string based on configuration.
File
- src/
Plugin/ migrate/ process/ DomStrReplace.php, line 200
Class
- DomStrReplace
- String replacements on a source dom.
Namespace
Drupal\migrate_plus\Plugin\migrate\processCode
protected function postReplace(\DOMElement $html_node, $new_subject) {
switch ($this->configuration['mode']) {
case 'attribute':
$html_node
->setAttribute($this->configuration['attribute_options']['name'], $new_subject);
}
}