You are here

public function RiddleView::getForm in Thunder 8.5

Same name and namespace in other branches
  1. 8.2 modules/thunder_article/modules/thunder_riddle/src/Plugin/EntityBrowser/Widget/RiddleView.php \Drupal\thunder_riddle\Plugin\EntityBrowser\Widget\RiddleView::getForm()
  2. 8.3 modules/thunder_article/modules/thunder_riddle/src/Plugin/EntityBrowser/Widget/RiddleView.php \Drupal\thunder_riddle\Plugin\EntityBrowser\Widget\RiddleView::getForm()
  3. 8.4 modules/thunder_article/modules/thunder_riddle/src/Plugin/EntityBrowser/Widget/RiddleView.php \Drupal\thunder_riddle\Plugin\EntityBrowser\Widget\RiddleView::getForm()

File

modules/thunder_riddle/src/Plugin/EntityBrowser/Widget/RiddleView.php, line 25

Class

RiddleView
Displays current selection in a View.

Namespace

Drupal\thunder_riddle\Plugin\EntityBrowser\Widget

Code

public function getForm(array &$original_form, FormStateInterface $form_state, array $additional_widget_parameters) {
  $form = parent::getForm($original_form, $form_state, $additional_widget_parameters);
  $form['actions']['import_riddle'] = [
    '#title' => $this
      ->t('Import my riddles'),
    '#type' => 'link',
    '#attributes' => [
      'class' => [
        'button',
      ],
    ],
    '#url' => Url::fromRoute('riddle_marketplace.import'),
  ];
  return $form;
}