function EntityDateFormat::updateEntityProperty

Same name in other branches
  1. 9 core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat::updateEntityProperty()
  2. 8.9.x core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat::updateEntityProperty()
  3. 10 core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat::updateEntityProperty()

Overrides EntityConfigBase::updateEntityProperty

File

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

Class

EntityDateFormat
Migration destination for date format entity.

Namespace

Drupal\system\Plugin\migrate\destination

Code

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.