You are here

File.php in Crop API 8

Same filename and directory in other branches
  1. 8.2 src/Plugin/Crop/EntityProvider/File.php

File

src/Plugin/Crop/EntityProvider/File.php
View source
<?php

namespace Drupal\crop\Plugin\Crop\EntityProvider;

use Drupal\Core\Entity\EntityInterface;
use Drupal\crop\EntityProviderBase;

/**
 * File crop integration.
 *
 * @CropEntityProvider(
 *   entity_type = "file",
 *   label = @Translation("File"),
 *   description = @Translation("Provides crop integration for core files.")
 * )
 */
class File extends EntityProviderBase {

  /**
   * {@inheritdoc}
   */
  public function uri(EntityInterface $entity) {

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

}

Classes

Namesort descending Description
File File crop integration.