function ProcessPluginBase::transform

Same name in other branches
  1. 9 core/modules/migrate/src/ProcessPluginBase.php \Drupal\migrate\ProcessPluginBase::transform()
  2. 8.9.x core/modules/migrate/src/ProcessPluginBase.php \Drupal\migrate\ProcessPluginBase::transform()
  3. 11.x core/modules/migrate/src/ProcessPluginBase.php \Drupal\migrate\ProcessPluginBase::transform()

Overrides MigrateProcessInterface::transform

75 methods override ProcessPluginBase::transform()
ArrayBuild::transform in core/modules/migrate/src/Plugin/migrate/process/ArrayBuild.php
Performs the associated process.
BlockPluginId::transform in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
Set the block plugin id.
BlockSettings::transform in core/modules/block/src/Plugin/migrate/process/BlockSettings.php
Set the block configuration.
BlockTheme::transform in core/modules/block/src/Plugin/migrate/process/BlockTheme.php
Performs the associated process.
BlockVisibility::transform in core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
Performs the associated process.

... See full list

File

core/modules/migrate/src/ProcessPluginBase.php, line 43

Class

ProcessPluginBase
The base class for all migrate process plugins.

Namespace

Drupal\migrate

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    // Do not call this method from children.
    if (isset($this->configuration['method'])) {
        if (method_exists($this, $this->configuration['method'])) {
            return $this->{$this->configuration['method']}($value, $migrate_executable, $row, $destination_property);
        }
        throw new \BadMethodCallException(sprintf('The %s method does not exist in the %s plugin.', $this->configuration['method'], $this->pluginId));
    }
    else {
        throw new \BadMethodCallException(sprintf('The "method" key in the plugin configuration must to be set for the %s plugin.', $this->pluginId));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.