/** * {@inheritdoc} */ public function processFieldFormatter(MigrationInterface $migration) { $process = []; foreach ($this->getFieldFormatterMap() as $source_format => $destination_format) { $process[0]['map'][$this->pluginId][$source_format] = $destination_format; } $migration->mergeProcessOfProperty('options/type', $process); }
/** * {@inheritdoc} */ public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { // The data is stored differently depending on whether we're using // db storage. $value_key = $data['db_storage'] ? $field_name : "{$field_name}/value"; $format_key = $data['db_storage'] ? $field_name . '_format' : "{$field_name}/format"; $migration->setProcessOfProperty("{$field_name}/value", $value_key); // See \Drupal\migrate_drupal\Plugin\migrate\source\d6\User::baseFields(), // signature_format for an example of the YAML that represents this // process array. $process = [['plugin' => 'static_map', 'bypass' => TRUE, 'source' => $format_key, 'map' => [0 => NULL]], ['plugin' => 'skip_on_empty', 'method' => 'process'], ['plugin' => 'migration', 'migration' => 'd6_filter_format', 'source' => $format_key]]; $migration->mergeProcessOfProperty("{$field_name}/format", $process); }
/** * {@inheritdoc} */ public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { $process = ['plugin' => 'd6_cck_file', 'source' => [$field_name, $field_name . '_list', $field_name . '_data']]; $migration->mergeProcessOfProperty($field_name, $process); }
/** * {@inheritdoc} */ public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { $process = ['plugin' => 'iterator', 'source' => $field_name, 'process' => ['target_id' => 'fid', 'display' => 'display', 'description' => 'description']]; $migration->mergeProcessOfProperty($field_name, $process); }
/** * {@inheritdoc} */ public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { $process = ['plugin' => 'iterator', 'source' => $field_name, 'process' => ['target_id' => 'fid', 'alt' => 'alt', 'title' => 'title', 'width' => 'width', 'height' => 'height']]; $migration->mergeProcessOfProperty($field_name, $process); }
/** * Manipulate file fields with any per field type processing. * * @param string $field_name * The field we're processing. * @param array $field_data * The an array of field type data from the source. * @param \Drupal\migrate\Entity\MigrationInterface $migration * The migration entity. */ protected function processFileField($field_name, $field_data, MigrationInterface $migration) { $process = ['plugin' => 'd6_cck_file', 'source' => [$field_name, $field_name . '_list', $field_name . '_data']]; $migration->mergeProcessOfProperty($field_name, $process); }
/** * Manipulate link fields with any per field type processing. * * @param string $field_name * The field we're processing. * @param array $field_data * The an array of field type data from the source. * @param \Drupal\migrate\Entity\MigrationInterface $migration * The migration entity. */ protected function processLinkField($field_name, $field_data, MigrationInterface $migration) { // Specifically process the link field until core is fixed. // @see https://www.drupal.org/node/2235457 $process = ['plugin' => 'd6_cck_link', 'source' => [$field_name, $field_name . '_title', $field_name . '_attributes']]; $migration->mergeProcessOfProperty($field_name, $process); }