Single   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getForm() 0 3 1
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