Commit 5e99b3b1 authored by quietone's avatar quietone
Browse files

Issue #3252562 by rlhawk, mikelutz, benjifisher, danflanagan8: In Callback...

Issue #3252562 by rlhawk, mikelutz, benjifisher, danflanagan8: In Callback Migrate process, document how to use functions that accept no argument as callable
parent bd7e90b1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -41,6 +41,17 @@
 *     source: source_field
 * @endcode
 *
 * An example where the callback accepts no arguments:
 *
 * @code
 * process:
 *   time:
 *     plugin: callback
 *     callable: time
 *     unpack_source: true
 *     source: [  ]
 * @endcode
 *
 * An example where the callback accepts more than one argument:
 *
 * @code
+5 −0
Original line number Diff line number Diff line
@@ -66,6 +66,11 @@ public function providerCallbackArray() {
        [['One', 'two'], ['1', '2'], 'One, two, three!'],
        '1, 2, three!',
      ],
      'pi' => [
        'pi',
        [],
        pi(),
      ],
    ];
  }