function MigrateField::__construct

Same name in other branches
  1. 9 core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField::__construct()
  2. 10 core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField::__construct()
  3. 11.x core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField::__construct()
  4. 11.x core/modules/migrate_drupal/src/Attribute/MigrateField.php \Drupal\migrate_drupal\Attribute\MigrateField::__construct()
  5. 10 core/modules/migrate_drupal/src/Attribute/MigrateField.php \Drupal\migrate_drupal\Attribute\MigrateField::__construct()

Overrides Plugin::__construct

File

core/modules/migrate_drupal/src/Annotation/MigrateField.php, line 25

Class

MigrateField
Defines a field plugin annotation object.

Namespace

Drupal\migrate_drupal\Annotation

Code

public function __construct($values) {
    parent::__construct($values);
    // Provide default value for core property, in case it's missing.
    if (empty($this->definition['core'])) {
        $this->definition['core'] = [
            6,
        ];
    }
}

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