You are here

public function MappingSteps::getForm in GatherContent 8.5

Same name and namespace in other branches
  1. 8.4 gathercontent_ui/src/Form/MappingEditSteps/MappingSteps.php \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingSteps::getForm()

Returns form array.

Parameters

\Drupal\Core\Form\FormStateInterface $formState: Form state object.

Return value

mixed Return form array.

2 calls to MappingSteps::getForm()
MappingStepEdit::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepEdit.php
Returns form array.
MappingStepNew::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepNew.php
Returns form array.
3 methods override MappingSteps::getForm()
MappingStepEdit::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepEdit.php
Returns form array.
MappingStepEntityReference::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepEntityReference.php
Returns form array.
MappingStepNew::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepNew.php
Returns form array.

File

gathercontent_ui/src/Form/MappingEditSteps/MappingSteps.php, line 118

Class

MappingSteps
Class MappingSteps.

Namespace

Drupal\gathercontent_ui\Form\MappingEditSteps

Code

public function getForm(FormStateInterface $formState) {
  $form['form_description'] = [
    '#type' => 'html_tag',
    '#tag' => 'i',
    '#value' => $this
      ->t('Please map your GatherContent Template fields to your Drupal
      Content Type Fields. Please note that a GatherContent field can only be
      mapped to a single Drupal field. So each field can only be mapped to once.'),
  ];
  $form['gathercontent_project'] = [
    '#type' => 'item',
    '#title' => $this
      ->t('Project name:'),
    '#markup' => $this->mapping
      ->getGathercontentProject(),
    '#wrapper_attributes' => [
      'class' => [
        'inline-label',
      ],
    ],
  ];
  $form['gathercontent'] = [
    '#type' => 'container',
  ];
  $form['gathercontent']['gathercontent_template'] = [
    '#type' => 'item',
    '#title' => $this
      ->t('GatherContent template:'),
    '#markup' => $this->mapping
      ->getGathercontentTemplate(),
    '#wrapper_attributes' => [
      'class' => [
        'inline-label',
      ],
    ],
  ];
  return $form;
}