GeneratorBase   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 36
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 1 1
A postprocessParagraph() 0 1 1
A processParagraph() 0 1 1
A complete() 0 1 1
A postprocessField() 0 1 1
A processField() 0 1 1
1
<?php
2
3
namespace Drupal\paragraphs_editor\WidgetBinder;
4
5
use Drupal\Core\Render\RenderContext;
6
use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
7
use Drupal\paragraphs\ParagraphInterface;
8
9
/**
10
 * A utility class for widget binder data generator services to extend.
11
 */
12
abstract class GeneratorBase implements GeneratorInterface {
13
14
  /**
15
   * {@inheritdoc}
16
   */
17
  public function initialize(WidgetBinderData $data, WidgetBinderDataCompilerState $state, ParagraphInterface $paragraph) {
18
  }
19
20
  /**
21
   * {@inheritdoc}
22
   */
23
  public function processParagraph(WidgetBinderData $data, WidgetBinderDataCompilerState $state, ParagraphInterface $paragraph) {
24
  }
25
26
  /**
27
   * {@inheritdoc}
28
   */
29
  public function processField(WidgetBinderData $data, WidgetBinderDataCompilerState $state, EntityReferenceFieldItemListInterface $items, $is_editor_field) {
30
  }
31
32
  /**
33
   * {@inheritdoc}
34
   */
35
  public function postprocessParagraph(WidgetBinderData $data, WidgetBinderDataCompilerState $state, ParagraphInterface $paragraph) {
36
  }
37
38
  /**
39
   * {@inheritdoc}
40
   */
41
  public function postprocessField(WidgetBinderData $data, WidgetBinderDataCompilerState $state, EntityReferenceFieldItemListInterface $items, $is_editor_field) {
42
  }
43
44
  /**
45
   * {@inheritdoc}
46
   */
47
  public function complete(WidgetBinderData $data, WidgetBinderDataCompilerState $state, RenderContext $render_context, $markup) {
48
  }
49
50
}
51