You are here

function deploy_uuid_file_load in Deploy - Content Staging 6

Implementation of hook_file_load()

Add the UUID to file objects on load.

File

modules/deploy_uuid/deploy_uuid.module, line 28
Deployment UUID management

Code

function deploy_uuid_file_load(&$file) {

  // Ensure that $file is an object.
  if (!is_object($file)) {
    $file = (object) $file;
  }
  $uuid = deploy_uuid_get_files_uuid($file->fid);
  if ($uuid) {
    $file->uuid = $uuid;
  }
}