You are here

public function GroupDeleteConfirm::buildForm in Paragraphs Browser 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 FormInterface::buildForm

File

src/Form/GroupDeleteConfirm.php, line 34

Class

GroupDeleteConfirm
Class CleanupUrlAliases.

Namespace

Drupal\paragraphs_browser\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, BrowserTypeInterface $paragraphs_browser_type = null, $group_machine_name = '') {
  $this->entity = $paragraphs_browser_type;
  $form['id'] = array(
    '#type' => 'hidden',
    '#value' => $group_machine_name,
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => $this
      ->t('Confirm Deletion'),
    '#button_type' => 'primary',
    '#submit' => array(
      '::submitForm',
      '::save',
    ),
  );
  return $form;
}