Allow developers to expose more configuration in the migrate form
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3217657. -->
Reported by: [matroskeen](https://www.drupal.org/user/3426249)
Related to !2
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>At the moment, Migrate Source UI exposes one migration property at the form - File path. However, in our project, we'd like to make configurable something else. We'd like to extend the basic form, add one more form element and pass a selected value into the migration plugin definition (for example, as a constant) so we can use it inside the migration.</p>
<p>Currently, it's complicated and requires many things to change/extend, but it can be much simpler.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>The initial idea is the following:<br>
1) Pass these options as source plugin configuration (so it'll be applied automatically in <a href="https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/modules/migrate/src/Plugin/Migration.php#L281">Migration constructor</a>);<br>
2) Move options definition into another protected method, so it can be easily overridden;</p>
<p>Also, I think we can try to remove <code>\Drupal\migrate_source_ui\MigrateBatchExecutable</code> because it looks very similar to <code>Drupal\migrate_tools\MigrateBatchExecutable </code> and it's hard to maintain the same state between both classes.</p>
<p>For example, the migrate source batch is losing an important feature that was added to migrate_tools here: <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/migrate_tools/issues/3145997" title="Status: Closed (fixed)">#3145997: Support passing $options['configuration'] to batch callback</a></span>.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>1) Accept <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/migrate_tools/issues/3217651" title="Status: Closed (fixed)">#3217651: Allow passing migration configuration into MigrateBatchExecutable</a></span>;<br>
2) Review and commit the merge request;</p>
issue