You are here

protected function FlowForm::selectTypeForm in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Form/FlowForm.php \Drupal\cms_content_sync\Form\FlowForm::selectTypeForm()
  2. 2.0.x src/Form/FlowForm.php \Drupal\cms_content_sync\Form\FlowForm::selectTypeForm()

If nothing has been configured yet, let the user chose whether to push and pull with this flow. This will make the flow form significantly smaller and simpler to manage.

Return value

array

1 call to FlowForm::selectTypeForm()
FlowForm::form in src/Form/FlowForm.php
Gets the actual form array to be built.

File

src/Form/FlowForm.php, line 759

Class

FlowForm
Form handler for the Flow add and edit forms.

Namespace

Drupal\cms_content_sync\Form

Code

protected function selectTypeForm(array $form, FormStateInterface $form_state) {
  $form['type'] = [
    '#title' => $this
      ->t('Type'),
    '#markup' => $this
      ->t('Please select the type of Flow you want to create.') . '<br><br>' . $this
      ->t('For content staging select "push" on your stage site and "pull" on your production site.') . '<br><br>' . '<ul class="action-links">' . '<li><a class="button button-action button--primary button--small flow pull" href="?type=pull">' . $this
      ->t('Pull') . '</a></li>' . '<li><a class="button button-action button--primary button--small flow push" href="?type=push">' . $this
      ->t('Push') . '</a></li>' . '</ul>',
  ];
  return $form;
}