getFieldPlugin example

/** * {@inheritdoc} */
  public function getCoreVersion(MigrationInterface $migration) {
    return parent::getCoreVersion($migration);
  }

  /** * {@inheritdoc} */
  public function getFieldPlugin($field_type, MigrationInterface $migration) {
    return parent::getFieldPlugin($field_type$migration);
  }

  /** * {@inheritdoc} */
  public function getSourcePlugin($core) {
    return parent::getSourcePlugin($core);
  }

}

  public function addBundleFieldProcesses(MigrationInterface $migration$entity_type_id$bundle) {
    $core = $this->getCoreVersion($migration);
    $fields = $this->getAllFields($core);
    $plugin_definition = $migration->getPluginDefinition();
    if (empty($fields[$entity_type_id][$bundle])) {
      return;
    }
    $bundle_fields = $fields[$entity_type_id][$bundle];
    foreach ($bundle_fields as $field_name => $field_info) {
      $plugin = $this->getFieldPlugin($field_info['type']$migration);
      if ($plugin) {
        $method = $plugin_definition['field_plugin_method'] ?? 'defineValueProcessPipeline';

        call_user_func_array([
          $plugin,
          $method,
        ][
          $migration,
          $field_name,
          $field_info,
        ]);
      }
Home | Imprint | This part of the site doesn't use cookies.