You are here

public function FlowPullConfirmation::buildForm in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Form/FlowPullConfirmation.php \Drupal\cms_content_sync\Form\FlowPullConfirmation::buildForm()
  2. 2.0.x src/Form/FlowPullConfirmation.php \Drupal\cms_content_sync\Form\FlowPullConfirmation::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 ConfirmFormBase::buildForm

File

src/Form/FlowPullConfirmation.php, line 77

Class

FlowPullConfirmation
Provides a pool pull all confirmation page.

Namespace

Drupal\cms_content_sync\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $cms_content_sync_flow = null) {
  $this->cms_content_sync_flow = $cms_content_sync_flow;
  $this->flow = $this->flow_storage
    ->load($this->cms_content_sync_flow);
  $form['pull_mode'] = [
    '#type' => 'radios',
    '#options' => [
      'new_entities' => $this
        ->t('Only add new entities'),
      'all_entities' => $this
        ->t('Force update of all entities'),
    ],
    '#default_value' => 'new_entities',
  ];
  return parent::buildForm($form, $form_state);
}