You are here

private function S3FileMap::insert in Acquia Content Hub 8.2

Inserts a new trackable file.

Parameters

string $file_uuid: The file entity uuid.

string $bucket: The source bucket.

string $root_folder: The s3 root key prefix.

string $origin_uuid: The publisher site's origin.

Throws

\Exception

1 call to S3FileMap::insert()
S3FileMap::record in modules/acquia_contenthub_s3/src/S3FileMap.php
Records the origin of an s3 file.

File

modules/acquia_contenthub_s3/src/S3FileMap.php, line 202

Class

S3FileMap
Responsible for storing information about file s3 source.

Namespace

Drupal\acquia_contenthub_s3

Code

private function insert(string $file_uuid, string $bucket, string $root_folder, string $origin_uuid) : void {
  $this->database
    ->insert(self::TABLE_NAME)
    ->fields([
    'file_uuid' => $file_uuid,
    'bucket' => $bucket,
    'root_folder' => $root_folder,
    'origin_uuid' => $origin_uuid,
  ])
    ->execute();
}