예제 #1
0
 /**
  * Updates an entity with the contents of a row.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity to update.
  * @param \Drupal\migrate\Row $row
  *   The row object to update from.
  */
 protected function updateEntity(EntityInterface $entity, Row $row)
 {
     foreach ($row->getRawDestination() as $property => $value) {
         $this->updateEntityProperty($entity, explode(Row::PROPERTY_SEPARATOR, $property), $value);
     }
     $this->setRollbackAction($row->getIdMap());
 }
예제 #2
0
파일: Config.php 프로젝트: isramv/camp-gdl
 /**
  * {@inheritdoc}
  */
 public function import(Row $row, array $old_destination_id_values = array())
 {
     foreach ($row->getRawDestination() as $key => $value) {
         if (isset($value) || !empty($this->configuration['store null'])) {
             $this->config->set(str_replace(Row::PROPERTY_SEPARATOR, '.', $key), $value);
         }
     }
     $this->config->save();
     return [$this->config->getName()];
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function import(Row $row, array $old_destination_id_values = array())
 {
     if ($row->hasDestinationProperty('langcode')) {
         $this->config = $this->language_manager->getLanguageConfigOverride($row->getDestinationProperty('langcode'), $this->config->getName());
     }
     foreach ($row->getRawDestination() as $key => $value) {
         if (isset($value) || !empty($this->configuration['store null'])) {
             $this->config->set(str_replace(Row::PROPERTY_SEPARATOR, '.', $key), $value);
         }
     }
     $this->config->save();
     return [$this->config->getName()];
 }