protected function DomProcessBase::init in Migrate Plus 8.5
Same name and namespace in other branches
- 8.4 src/Plugin/migrate/process/DomProcessBase.php \Drupal\migrate_plus\Plugin\migrate\process\DomProcessBase::init()
Initialize the class properties.
Parameters
mixed $value: Process plugin value.
string $destination_property: The name of the destination being processed. Used to generate an error message.
Throws
\Drupal\migrate\MigrateSkipRowException If $value is not a \DOMDocument object.
5 calls to DomProcessBase::init()
- DomApplyStyles::transform in src/
Plugin/ migrate/ process/ DomApplyStyles.php - Performs the associated process.
- DomMigrationLookup::transform in src/
Plugin/ migrate/ process/ DomMigrationLookup.php - Performs the associated process.
- DomRemove::transform in src/
Plugin/ migrate/ process/ DomRemove.php - Performs the associated process.
- DomSelect::transform in src/
Plugin/ migrate/ process/ DomSelect.php - Performs the associated process.
- DomStrReplace::transform in src/
Plugin/ migrate/ process/ DomStrReplace.php - Performs the associated process.
File
- src/
Plugin/ migrate/ process/ DomProcessBase.php, line 43
Class
- DomProcessBase
- Base class for process plugins that work with \DOMDocument objects.
Namespace
Drupal\migrate_plus\Plugin\migrate\processCode
protected function init($value, $destination_property) {
if (!$value instanceof \DOMDocument) {
$message = sprintf('The %s plugin in the %s process pipeline requires a \\DOMDocument object. You can use the dom plugin to convert a string to \\DOMDocument.', $this
->getPluginId(), $destination_property);
throw new MigrateSkipRowException($message);
}
$this->document = $value;
$this->xpath = new \DOMXPath($this->document);
}