File::uri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Drupal\crop\Plugin\Crop\EntityProvider;
4
5
use Drupal\Core\Entity\EntityInterface;
6
use Drupal\crop\EntityProviderBase;
7
8
/**
9
 * File crop integration.
10
 *
11
 * @CropEntityProvider(
12
 *   entity_type = "file",
13
 *   label = @Translation("File"),
14
 *   description = @Translation("Provides crop integration for core files.")
15
 * )
16
 */
17
class File extends EntityProviderBase {
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function uri(EntityInterface $entity) {
23
    /** @var \Drupal\file\FileInterface $entity */
24
    return $entity->getFileUri();
25
  }
26
27
}
28