CropEntityProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
1
<?php
2
3
namespace Drupal\crop\Annotation;
4
5
use Drupal\Component\Annotation\Plugin;
6
7
/**
8
 * Defines the annotation object for crop integration with storage entities.
9
 *
10
 * @see hook_crop_entity_provider_info_alter()
11
 *
12
 * @Annotation
13
 */
14
class CropEntityProvider extends Plugin {
15
16
  /**
17
   * Entity type plugin provides.
18
   *
19
   * @var string
20
   */
21
  public $entity_type;
22
23
  /**
24
   * The human-readable name of the crop entity provider.
25
   *
26
   * Will usually match entity type name.
27
   *
28
   * @var \Drupal\Core\Annotation\Translation
29
   *
30
   * @ingroup plugin_translatable
31
   */
32
  public $label;
33
34
  /**
35
   * A brief description of the crop entity provider.
36
   *
37
   * @var \Drupal\Core\Annotation\Translation
38
   *
39
   * @ingroup plugin_translatable
40
   */
41
  public $description = '';
42
43
  /**
44
   * {@inheritdoc}
45
   */
46
  public function getId() {
47
    return $this->definition['entity_type'];
48
  }
49
50
}
51