You are here

interface PhotosUploadInterface in Album Photos 8.5

Same name and namespace in other branches
  1. 6.0.x src/PhotosUploadInterface.php \Drupal\photos\PhotosUploadInterface

Photos upload and file management functions.

Hierarchy

Expanded class hierarchy of PhotosUploadInterface

All classes that implement PhotosUploadInterface

2 files declare their use of PhotosUploadInterface
PhotosImage.php in src/Plugin/migrate/destination/PhotosImage.php
PhotosUploadForm.php in src/Form/PhotosUploadForm.php

File

src/PhotosUploadInterface.php, line 10

Namespace

Drupal\photos
View source
interface PhotosUploadInterface {

  /**
   * Rename file with random name.
   *
   * @param string $title
   *   The file name.
   *
   * @return string
   *   The new name.
   */
  public function cleanTitle($title = '');

  /**
   * Temporary file path.
   *
   * The image file path is now handled in the field settings. This is used
   * if needed before the field settings are triggered.
   *
   * @param string $schemaType
   *   A string with the URL alias to clean up.
   *
   * @return string
   *   The cleaned URL alias.
   */
  public function path($schemaType = 'default');

  /**
   * Attach image file to PhotosImage entity.
   *
   * @param \Drupal\file\Entity\File $file
   *   The file entity.
   *
   * @return bool
   *   TRUE if image saved successfully.
   */
  public function saveImage(File $file);

  /**
   * Attach media to PhotosImage entity.
   *
   * @param int $mediaId
   *   The media entity_id.
   * @param int $albumId
   *   The album entity_id.
   *
   * @return bool
   *   TRUE if media saved successfully.
   */
  public function saveExistingMedia($mediaId, $albumId);

  /**
   * Unzip archive of image files.
   *
   * @param string $source
   *   The zip file location.
   * @param array $params
   *   Array of additional parameters like album id.
   * @param string $scheme
   *   The file scheme.
   */
  public function unzip($source, array $params, $scheme = 'default');

}

Members

Namesort descending Modifiers Type Description Overrides
PhotosUploadInterface::cleanTitle public function Rename file with random name. 1
PhotosUploadInterface::path public function Temporary file path. 1
PhotosUploadInterface::saveExistingMedia public function Attach media to PhotosImage entity. 1
PhotosUploadInterface::saveImage public function Attach image file to PhotosImage entity. 1
PhotosUploadInterface::unzip public function Unzip archive of image files. 1