public function MigrateFileBlob::processFile in Migrate 7.2
Implementation of MigrateFileInterface::processFile().
Parameters
$value: The file contents to be saved as a file.
$owner: User ID (uid) to be the owner of the file.
Return value
object File entity being created or referenced.
Overrides MigrateFile::processFile
File
- plugins/
destinations/ file.inc, line 524 - Support for file entity as destination. Note that File Fields have their own destination in fields.inc
Class
- MigrateFileBlob
- Handle cases where we're handed a blob (i.e., the actual contents of a file, such as image data) to be stored as a real file in Drupal.
Code
public function processFile($value, $owner) {
$this->fileContents = $value;
$file = parent::processFile($value, $owner);
return $file;
}