You are here

class RiddleView in Thunder 8.4

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

Displays current selection in a View.

Plugin annotation


@EntityBrowserWidget(
  id = "riddle_view",
  label = @Translation("Riddle View"),
  provider = "views",
  description = @Translation("Extended view to import riddles out of the EB."),
  auto_select = TRUE
)

Hierarchy

  • class \Drupal\thunder_riddle\Plugin\EntityBrowser\Widget\RiddleView extends \Drupal\entity_browser\Plugin\EntityBrowser\Widget\View

Expanded class hierarchy of RiddleView

File

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

Namespace

Drupal\thunder_riddle\Plugin\EntityBrowser\Widget
View source
class RiddleView extends View {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members