Commit 9ad86501 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Lucas Hedding
Browse files

Issue #3265411: FileBlob - document configuration properties.

parent 996e4f18
Loading
Loading
Loading
Loading
+6 −7
Changes for src/Plugin/migrate/process/FileBlob.php: 6 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -18,9 +18,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 * - The binary blob data.
 *
 * Available configuration keys:
 * - reuse: true
 *
 * @codingStandardsIgnoreStart
 * - reuse: (optional) Indicates whether to overwrite existing files. If TRUE,
 *   then existing files won't be replaced, and previously copied files will be
 *   reused. Defaults to FALSE.
 *
 * Examples:
 * @code
@@ -57,7 +57,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 *       - @destination_path
 *       - @destination_blob
 * @endcode
   In the example above, it is necessary to manipulate  the values before they
 *
 * In the example above, it is necessary to manipulate the values before they
 * are processed by this plugin. This is because this plugin takes a binary blob
 * and saves it as a file. In many cases, as in this example, the data is base64
 * encoded and should be decoded first. In destination_blob, the incoming data
@@ -66,8 +67,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 * constants to create the final path. The resulting values are then referenced
 * as the source of the file_blob plugin.
 *
 * @codingStandardsIgnoreEnd
 *
 * @MigrateProcessPlugin(
 *   id = "file_blob"
 * )
@@ -124,7 +123,7 @@ class FileBlob extends ProcessPluginBase implements ContainerFactoryPluginInterf
    }
    [$destination, $blob] = $value;

    // Determine if we going to overwrite existing files or not touch them.
    // Determine if we're going to overwrite existing files or not touch them.
    $replace = $this->getOverwriteMode();

    // Attempt to save the file to avoid calling file_prepare_directory() any