You are here

public function EntityConfigSettingsForm::buildForm in Acquia Content Hub 8

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 ConfigFormBase::buildForm

File

src/Form/EntityConfigSettingsForm.php, line 121

Class

EntityConfigSettingsForm
Defines the form to configure the entity types and bundles to be exported.

Namespace

Drupal\acquia_contenthub\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['description'] = [
    '#type' => 'item',
    '#description' => $this
      ->t('Select the bundles of the entity types you would like to publish to Acquia Content Hub. <br/><br/><strong>Optional</strong><br/>Choose a view mode for each of the selected bundles to be rendered before sending to Acquia Content Hub. <br/>You can choose the view modes to use for rendering the items of different datasources and bundles. We recommend using a dedicated view mode to make sure that only relevant data (especially no field labels) will be transferred to Content Hub.'),
  ];
  $form['entity_config']['entities'] = $this
    ->buildEntitiesForm();
  $form['entity_config']['user_role'] = $this
    ->buildUserRoleForm();
  $form['entity_config']['user_role_warning'] = $this
    ->buildUserRoleWarningForm();
  return parent::buildForm($form, $form_state);
}