class MigrateFileUriAsIs in Migrate 7.2
The simplest possible file class - where the value is a remote URI which simply needs to be saved as the URI on the destination side, with no attempt to copy or otherwise use it.
Hierarchy
- class \MigrateFileBase implements MigrateFileInterface
- class \MigrateFileUriAsIs
Expanded class hierarchy of MigrateFileUriAsIs
File
- plugins/
destinations/ file.inc, line 176 - Support for file entity as destination. Note that File Fields have their own destination in fields.inc
View source
class MigrateFileUriAsIs extends MigrateFileBase {
public function processFile($value, $owner) {
$file = file_save($this
->createFileEntity($value, $owner));
return $file;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateFileBase:: |
protected | property | An optional file object to use as a default starting point for building the file entity. | |
MigrateFileBase:: |
protected | property | How to handle destination filename collisions. | |
MigrateFileBase:: |
protected | property | Set to TRUE to prevent file deletion on rollback. | |
MigrateFileBase:: |
protected | function | Setup a file entity object suitable for saving. | |
MigrateFileBase:: |
public static | function |
Default implementation of MigrateFileInterface::fields(). Overrides MigrateFileInterface:: |
1 |
MigrateFileBase:: |
constant | Extension of the core FILE_EXISTS_* constants, offering an alternative to reuse the existing file if present as-is (core only offers the options of replacing it or renaming to avoid collision). | ||
MigrateFileBase:: |
protected | function | If asked to preserve files from deletion on rollback, add a file_usage entry. | |
MigrateFileBase:: |
public | function | 1 | |
MigrateFileUriAsIs:: |
public | function |
Create or link to a Drupal file entity. Overrides MigrateFileInterface:: |