You are here

public function File::uri in Crop API 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Crop/EntityProvider/File.php \Drupal\crop\Plugin\Crop\EntityProvider\File::uri()

Gets URI of the image file.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Entity being cropping.

Return value

string|false URI as string or FALSE

Overrides EntityProviderBase::uri

File

src/Plugin/Crop/EntityProvider/File.php, line 22

Class

File
File crop integration.

Namespace

Drupal\crop\Plugin\Crop\EntityProvider

Code

public function uri(EntityInterface $entity) {

  /** @var \Drupal\file\FileInterface $entity */
  return $entity
    ->getFileUri();
}