getTemporaryTableMappingPrefix example

/** * {@inheritdoc} */
  public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
    $this->traitOnFieldableEntityTypeUpdate($entity_type$original$field_storage_definitions$original_field_storage_definitions$sandbox);
  }

  /** * {@inheritdoc} */
  protected function preUpdateEntityTypeSchema(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
    $temporary_prefix = static::getTemporaryTableMappingPrefix($entity_type$field_storage_definitions);
    $sandbox['temporary_table_mapping'] = $this->storage->getCustomTableMapping($entity_type$field_storage_definitions$temporary_prefix);
    $sandbox['new_table_mapping'] = $this->storage->getCustomTableMapping($entity_type$field_storage_definitions);
    $sandbox['original_table_mapping'] = $this->storage->getCustomTableMapping($original$original_field_storage_definitions);

    $backup_prefix = static::getTemporaryTableMappingPrefix($original$original_field_storage_definitions, 'old_');
    $sandbox['backup_table_mapping'] = $this->storage->getCustomTableMapping($original$original_field_storage_definitions$backup_prefix);
    $sandbox['backup_prefix_key'] = substr($backup_prefix, 4);
    $sandbox['backup_request_time'] = \Drupal::time()->getRequestTime();

    // Create temporary tables based on the new entity type and field storage     // definitions.
Home | Imprint | This part of the site doesn't use cookies.