crop-8.x-2.x-dev/src/Plugin/Crop/EntityProvider/File.php

src/Plugin/Crop/EntityProvider/File.php
<?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();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc