예제 #1
0
 /**
  * {@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);
 }
예제 #2
0
파일: TextField.php 프로젝트: scratch/gai
 /**
  * {@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);
 }
예제 #3
0
파일: FileField.php 프로젝트: nsp15/Drupal8
 /**
  * {@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);
 }
예제 #4
0
파일: FileField.php 프로젝트: Wylbur/gj
 /**
  * {@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);
 }
예제 #5
0
파일: ImageField.php 프로젝트: Wylbur/gj
 /**
  * {@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);
 }
예제 #6
0
 /**
  * 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);
 }
예제 #7
0
 /**
  * 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);
 }