You are here

interface FlippingBookInterface in Flipping Book 8

Same name in this branch
  1. 8 src/FlippingBookInterface.php \Drupal\flipping_book\FlippingBookInterface
  2. 8 src/Entity/FlippingBookInterface.php \Drupal\flipping_book\Entity\FlippingBookInterface

Interface FlippingBookInterface.

@package Drupal\flipping_book

Hierarchy

Expanded class hierarchy of FlippingBookInterface

All classes that implement FlippingBookInterface

2 files declare their use of FlippingBookInterface
FlippingBookForm.php in src/Form/FlippingBookForm.php
FlippingBookTypeForm.php in src/Form/FlippingBookTypeForm.php

File

src/FlippingBookInterface.php, line 12

Namespace

Drupal\flipping_book
View source
interface FlippingBookInterface {

  /**
   * Private Flipping Book stream definition.
   */
  const FLIPPING_BOOK_PRIVATE = 'private://flipping_books';

  /**
   * Public Flipping Book stream definition.
   */
  const FLIPPING_BOOK_PUBLIC = 'public://flipping_books';

  /**
   * Delete Flipping Book Archive.
   *
   * @param \Drupal\flipping_book\Entity\FlippingBook $flippingBook
   *   A Flipping Book entity.
   */
  public function deleteArchive(FlippingBookEntity $flippingBook);

  /**
   * Extract upload location.
   *
   * @param \Drupal\flipping_book\Entity\FlippingBook $flippingBook
   *   A Flipping Book entity.
   *
   * @return string
   *   The Flipping Book upload location.
   */
  public function extractUploadLocation(FlippingBookEntity $flippingBook);

  /**
   * Get Bundle Entity.
   *
   * @param \Drupal\flipping_book\Entity\FlippingBook $flippingBook
   *   A Flipping Book entity.
   *
   * @return \Drupal\flipping_book\Entity\FlippingBookType
   *   The Flipping Book type entity.
   */
  public function getBundleEntity(FlippingBookEntity $flippingBook);

  /**
   * Build Flipping Book URL.
   *
   * @param \Drupal\flipping_book\Entity\FlippingBook $flippingBook
   *   A Flipping Book entity.
   *
   * @return string
   *   The complete Flipping Book URL used for visualization.
   */
  public function buildFlippingBookUrl(FlippingBookEntity $flippingBook);

  /**
   * Extract uploaded archive.
   *
   * @param string $file_path
   *   The archive source path.
   * @param string $destination
   *   The destination path.
   *
   * @throws \Exception
   */
  public function extractArchive($file_path, $destination);

  /**
   * Helper function to sanitize flipping_book filename.
   *
   * @param string $filename.
   *   A string representing the file name.
   */
  public function cleanFilename($filename);

  /**
   * Prepare export directory.
   *
   * @param \Drupal\file\Entity\File $file
   *   A File entity.
   * @param string $export_location
   *   The export location path.
   *
   * @return array
   *   An array with filepath and destination info.
   */
  public function prepareExportDirectory(File $file, $export_location);

}

Members

Namesort descending Modifiers Type Description Overrides
FlippingBookInterface::buildFlippingBookUrl public function Build Flipping Book URL. 1
FlippingBookInterface::cleanFilename public function Helper function to sanitize flipping_book filename. 1
FlippingBookInterface::deleteArchive public function Delete Flipping Book Archive. 1
FlippingBookInterface::extractArchive public function Extract uploaded archive. 1
FlippingBookInterface::extractUploadLocation public function Extract upload location. 1
FlippingBookInterface::FLIPPING_BOOK_PRIVATE constant Private Flipping Book stream definition.
FlippingBookInterface::FLIPPING_BOOK_PUBLIC constant Public Flipping Book stream definition.
FlippingBookInterface::getBundleEntity public function Get Bundle Entity. 1
FlippingBookInterface::prepareExportDirectory public function Prepare export directory. 1