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. 10 core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat::updateEntityProperty()
  3. 11.x core/modules/system/src/Plugin/migrate/destination/EntityDateFormat.php \Drupal\system\Plugin\migrate\destination\EntityDateFormat::updateEntityProperty()

Parameters

\Drupal\Core\Datetime\DateFormatInterface $entity: The date entity.

Overrides EntityConfigBase::updateEntityProperty

File

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

Class

EntityDateFormat
Plugin annotation @MigrateDestination( id = "entity:date_format" )

Namespace

Drupal\system\Plugin\migrate\destination

Code

protected function updateEntityProperty(EntityInterface $entity, array $parents, $value) {
    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.