You are here

Single.php in Entity Browser 8.2

Same filename and directory in other branches
  1. 8 src/Plugin/EntityBrowser/WidgetSelector/Single.php

File

src/Plugin/EntityBrowser/WidgetSelector/Single.php
View source
<?php

namespace Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector;

use Drupal\entity_browser\WidgetSelectorBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Displays only first widget.
 *
 * @EntityBrowserWidgetSelector(
 *   id = "single",
 *   label = @Translation("Single widget"),
 *   description = @Translation("Displays only the first configured widget. Use this if you plan to have only one widget available.")
 * )
 */
class Single extends WidgetSelectorBase {

  /**
   * {@inheritdoc}
   */
  public function getForm(array &$form, FormStateInterface &$form_state) {
    return [];
  }

}

Classes

Namesort descending Description
Single Displays only first widget.