public function MigrationBase::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/MigrationBase.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigrationBase::buildForm()
- 2.1.x modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigrationBase.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigrationBase::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 FormInterface::buildForm
2 calls to MigrationBase::buildForm()
- MigratePull::buildForm in modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigratePull.php - Form constructor.
- MigratePush::buildForm in modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigratePush.php - Form constructor.
2 methods override MigrationBase::buildForm()
- MigratePull::buildForm in modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigratePull.php - Form constructor.
- MigratePush::buildForm in modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigratePush.php - Form constructor.
File
- modules/
cms_content_sync_migrate_acquia_content_hub/ src/ Form/ MigrationBase.php, line 158
Class
- MigrationBase
- Content Sync advanced debug form.
Namespace
Drupal\cms_content_sync_migrate_acquia_content_hub\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['backend_url'] = [
'#type' => 'url',
'#title' => $this
->t('Sync Core URL'),
'#required' => TRUE,
];
$auth_options = [
IApplicationInterface::AUTHENTICATION_TYPE_COOKIE => $this
->t("Standard (Cookie)"),
];
if ($this->moduleHandler
->moduleExists('basic_auth')) {
$auth_options[IApplicationInterface::AUTHENTICATION_TYPE_BASIC_AUTH] = $this
->t("Basic Auth");
}
$form['authentication_type'] = [
'#type' => 'select',
'#title' => $this
->t('Authentication'),
'#description' => $this
->t(PoolForm::AUTHENTICATION_TYPE_DESCRIPTION),
'#options' => $auth_options,
'#required' => TRUE,
];
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Create configuration'),
'#button_type' => 'primary',
];
return $form;
}