/** * {@inheritdoc} */ protected function getEntity(Row $row, array $old_destination_id_values) { $entity = parent::getEntity($row, $old_destination_id_values); // Set the "syncing" flag to TRUE, to avoid duplication of default // shortcut links $entity->setSyncing(TRUE); return $entity; }
/** * {@inheritdoc} * * @param \Drupal\system\DateFormatInterface $entity * The date entity. */ protected function updateEntityProperty(EntityInterface $entity, array $parents, $value) { if ($parents[0] == 'pattern') { $entity->setPattern($value); } else { parent::updateEntityProperty($entity, $parents, $value); } }
/** * {@inheritdoc} */ public function import(Row $row, array $old_destination_id_values = array()) { $entity_ids = parent::import($row, $old_destination_id_values); if ($row->getDestinationProperty('create_body')) { $node_type = $this->storage->load(reset($entity_ids)); node_add_body_field($node_type, $row->getDestinationProperty('create_body_label')); } return $entity_ids; }
/** * {@inheritdoc} */ public function import(Row $row, array $old_destination_id_values = array()) { $entity_ids = parent::import($row, $old_destination_id_values); \Drupal::service('comment.manager')->addBodyField(reset($entity_ids)); return $entity_ids; }