Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityContentBase.php

function EntityContentBase::getIds

Overrides MigrateDestinationInterface::getIds

2 methods override EntityContentBase::getIds()
EntityContentComplete::getIds in core/modules/migrate/src/Plugin/migrate/destination/EntityContentComplete.php
Gets the destination IDs.
EntityRevision::getIds in core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
Gets the destination IDs.

File

core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php, line 257

Class

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

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

public function getIds() {
    $ids = [];
    $id_key = $this->getKey('id');
    $ids[$id_key] = $this->getDefinitionFromEntity($id_key);
    if ($this->isTranslationDestination()) {
        $langcode_key = $this->getKey('langcode');
        if (!$langcode_key) {
            throw new MigrateException(sprintf('The "%s" entity type does not support translations.', $this->storage
                ->getEntityTypeId()));
        }
        $ids[$langcode_key] = $this->getDefinitionFromEntity($langcode_key);
    }
    return $ids;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal