CropEntityProvider::getId()   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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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