interface PhotosUploadInterface in Album Photos 6.0.x
Same name and namespace in other branches
- 8.5 src/PhotosUploadInterface.php \Drupal\photos\PhotosUploadInterface
Photos upload and file management functions.
Hierarchy
- interface \Drupal\photos\PhotosUploadInterface
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\photosView 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\FileInterface $file
   *   The file entity.
   *
   * @return bool
   *   TRUE if image saved successfully.
   */
  public function saveImage(FileInterface $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.
   *
   * @return int
   *   Uploaded files count.
   */
  public function unzip($source, array $params, $scheme = 'default');
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| PhotosUploadInterface:: | public | function | Rename file with random name. | 1 | 
| PhotosUploadInterface:: | public | function | Temporary file path. | 1 | 
| PhotosUploadInterface:: | public | function | Attach media to PhotosImage entity. | 1 | 
| PhotosUploadInterface:: | public | function | Attach image file to PhotosImage entity. | 1 | 
| PhotosUploadInterface:: | public | function | Unzip archive of image files. | 1 | 
