Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / system / src / Plugin / migrate / destination / EntityDateFormat.php
1 <?php
2
3 namespace Drupal\system\Plugin\migrate\destination;
4
5 use Drupal\Core\Entity\EntityInterface;
6 use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase;
7
8 /**
9  * @MigrateDestination(
10  *   id = "entity:date_format"
11  * )
12  */
13 class EntityDateFormat extends EntityConfigBase {
14
15   /**
16    * {@inheritdoc}
17    *
18    * @param \Drupal\Core\Datetime\DateFormatInterface $entity
19    *   The date entity.
20    */
21   protected function updateEntityProperty(EntityInterface $entity, array $parents, $value) {
22     if ($parents[0] == 'pattern') {
23       $entity->setPattern($value);
24     }
25     else {
26       parent::updateEntityProperty($entity, $parents, $value);
27     }
28   }
29
30 }