saveToSharedTables example

// Insert the entity data in the base and data tables only for default       // revisions.       /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
      if ($entity->isDefaultRevision()) {
        $record = $this->mapToStorageRecord($entity->getUntranslated()$this->baseTable);
        $this->database
          ->insert($this->baseTable)
          ->fields((array) $record)
          ->execute();

        if ($this->dataTable) {
          $this->saveToSharedTables($entity);
        }
      }

      // Insert the entity data in the revision and revision data tables.       if ($this->revisionTable) {
        $record = $this->mapToStorageRecord($entity->getUntranslated()$this->revisionTable);
        $this->database
          ->insert($this->revisionTable)
          ->fields((array) $record)
          ->execute();

        
Home | Imprint | This part of the site doesn't use cookies.