class EntityDateFormat

Same name and namespace in other branches
  1. 11.x core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat
  2. 10 core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat
  3. 8.9.x core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat

Plugin annotation


@MigrateDestination(
  id = "entity:date_format"
)

Hierarchy

Expanded class hierarchy of EntityDateFormat

File

core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php, line 14

Namespace

Drupal\system\Plugin\migrate\destination
View source
class EntityDateFormat extends EntityConfigBase {
  
  /**
   * {@inheritdoc}
   */
  protected function updateEntityProperty(EntityInterface $entity, array $parents, $value) {
    assert($entity instanceof DateFormatInterface);
    if ($parents[0] == 'pattern') {
      $entity->setPattern($value);
    }
    else {
      parent::updateEntityProperty($entity, $parents, $value);
    }
  }

}

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