You are here

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

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

Namesort descending Modifiers Type Description Overrides
MigrateFileBase::$defaultFile protected property An optional file object to use as a default starting point for building the file entity.
MigrateFileBase::$fileReplace protected property How to handle destination filename collisions.
MigrateFileBase::$preserveFiles protected property Set to TRUE to prevent file deletion on rollback.
MigrateFileBase::createFileEntity protected function Setup a file entity object suitable for saving.
MigrateFileBase::fields public static function Default implementation of MigrateFileInterface::fields(). Overrides MigrateFileInterface::fields 1
MigrateFileBase::FILE_EXISTS_REUSE 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::markForPreservation protected function If asked to preserve files from deletion on rollback, add a file_usage entry.
MigrateFileBase::__construct public function 1
MigrateFileUriAsIs::processFile public function Create or link to a Drupal file entity. Overrides MigrateFileInterface::processFile