Single::getForm()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector;
4
5
use Drupal\entity_browser\WidgetSelectorBase;
6
use Drupal\Core\Form\FormStateInterface;
7
8
/**
9
 * Displays only first widget.
10
 *
11
 * @EntityBrowserWidgetSelector(
12
 *   id = "single",
13
 *   label = @Translation("Single widget"),
14
 *   description = @Translation("Displays only the first configured widget. Use this if you plan to have only one widget available.")
15
 * )
16
 */
17
class Single extends WidgetSelectorBase {
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function getForm(array &$form, FormStateInterface &$form_state) {
23
    return [];
24
  }
25
26
}
27