Completed
Pull Request — 8.x-1.x (#123)
by
unknown
03:45
created

FieldWidgetDisplayBase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A settingsForm() 0 3 1
A isApplicable() 0 3 1
1
<?php
2
3
/**
4
 * @file
5
 * Contains \Drupal\entity_browser\FieldWidgetDisplayBase.
6
 */
7
8
namespace Drupal\entity_browser;
9
10
use Drupal\Core\Entity\EntityTypeInterface;
11
use Drupal\Core\Form\FormStateInterface;
12
use Drupal\Core\Plugin\PluginBase;
13
14
/**
15
 * Base implementation for field widget display plugins.
16
 */
17
abstract class FieldWidgetDisplayBase extends PluginBase implements FieldWidgetDisplayInterface {
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function settingsForm(array $form, FormStateInterface $form_state) {
23
    return [];
24
  }
25
26
  /**
27
   * {@inheritdoc}
28
   */
29
  public function isApplicable(EntityTypeInterface $entity_type) {
30
    return TRUE;
31
  }
32
33
}
34