public function MigratePush::buildForm in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigratePush::buildForm()
- 2.1.x modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigratePush::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides MigrationBase::buildForm
File
- modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigratePush.php, line 40
Class
- MigratePush
- Content Sync advanced debug form.
Namespace
Drupal\cms_content_sync_migrate_acquia_content_hub\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$this->migrationType = 'push';
$form = parent::buildForm($form, $form_state);
$url = Url::fromUri('https://edge-box.atlassian.net/wiki/spaces/SUP/pages/137232742/Export+and+Import+settings');
$link = Link::fromTextAndUrl(t('here'), $url);
$link = $link
->toRenderable();
$link['#attributes'] = [
'class' => [
'external',
],
];
$link = render($link);
$form['node_push_behavior'] = [
'#title' => $this
->t('Node push behavior'),
'#description' => $this
->t('This configuration allows to define if Nodes should be pushed automatically ("All") or manually ("Manually"). Further information about push behaviors could be found @link.', [
'@link' => $link,
]),
'#type' => 'select',
'#options' => [
PushIntent::PUSH_AUTOMATICALLY => $this
->t('Automatically'),
PushIntent::PUSH_MANUALLY => $this
->t('Manually'),
],
'#default_value' => PushIntent::PUSH_AUTOMATICALLY,
];
$form['#attached']['library'][] = 'cms_content_sync_migrate_acquia_content_hub/migrate-form';
return $form;
}