public function MigrateFileFid::processFile in Migrate 7.2
Implementation of MigrateFileInterface::processFile().
Parameters
$value: An existing file entity ID (fid).
$owner: User ID (uid) to be the owner of the file. Ignored in this case.
Return value
int The file entity corresponding to the fid that was passed in.
Overrides MigrateFileInterface::processFile
File
- plugins/
destinations/ file.inc, line 200 - Support for file entity as destination. Note that File Fields have their own destination in fields.inc
Class
- MigrateFileFid
- Handle the degenerate case where we already have a file ID.
Code
public function processFile($value, $owner) {
$this
->markForPreservation($value);
return file_load($value);
}