public function JsonForm::buildForm in CMS Content Sync 2.1.x
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/ JsonForm.php, line 30 
Class
- JsonForm
- Content Sync general settings form.
Namespace
Drupal\cms_content_sync\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
  $form['#attributes']['style'][] = 'display: none;';
  $form['json'] = [
    '#title' => 'JSON',
    '#type' => 'textarea',
  ];
  $form['action'] = [
    '#title' => 'Action',
    '#type' => 'radios',
    '#options' => [
      'save-flow' => 'Save Flow',
    ],
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => 'Submit',
    '#button_type' => 'primary',
  ];
  return $form;
}