LinkField.php

Same filename in this branch
  1. 11.x core/modules/link/src/Plugin/migrate/field/d7/LinkField.php
Same filename in other branches
  1. 9 core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
  2. 9 core/modules/link/src/Plugin/migrate/field/d7/LinkField.php
  3. 8.9.x core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
  4. 8.9.x core/modules/link/src/Plugin/migrate/field/d7/LinkField.php
  5. 8.9.x core/modules/link/src/Plugin/migrate/cckfield/LinkField.php
  6. 8.9.x core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php
  7. 10 core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
  8. 10 core/modules/link/src/Plugin/migrate/field/d7/LinkField.php

Namespace

Drupal\link\Plugin\migrate\field\d6

File

core/modules/link/src/Plugin/migrate/field/d6/LinkField.php

View source
<?php

namespace Drupal\link\Plugin\migrate\field\d6;

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Attribute\MigrateField;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
class LinkField extends FieldPluginBase {
    
    /**
     * {@inheritdoc}
     */
    public function getFieldFormatterMap() {
        // See d6_field_formatter_settings.yml and FieldPluginBase
        // alterFieldFormatterMigration().
        return [
            'default' => 'link',
            'plain' => 'link',
            'absolute' => 'link',
            'title_plain' => 'link',
            'url' => 'link',
            'short' => 'link',
            'label' => 'link',
            'separate' => 'link_separate',
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
        $process = [
            'plugin' => 'field_link',
            'source' => $field_name,
        ];
        $migration->mergeProcessOfProperty($field_name, $process);
    }

}

Classes

Title Deprecated Summary
LinkField

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