You are here

protected function EntityContentBase::save in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::save()

Save the entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity.

array $old_destination_id_values: An array of destination id values.

Return value

array An array containing the entity id.

1 call to EntityContentBase::save()
EntityContentBase::import in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
Import the row.
2 methods override EntityContentBase::save()
EntityRevision::save in core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
Save the entity.
TestEntityFile::save in core/modules/file/src/Tests/Migrate/EntityFileTest.php
Saves the entity.

File

core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php, line 110
Contains \Drupal\migrate\Plugin\migrate\destination\EntityContentBase.

Class

EntityContentBase
The destination class for all content entities lacking a specific class.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

protected function save(ContentEntityInterface $entity, array $old_destination_id_values = array()) {
  $entity
    ->save();
  return array(
    $entity
      ->id(),
  );
}