You are here

class LingotekDocumentArchivedException in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  2. 4.0.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  3. 3.0.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  4. 3.1.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  5. 3.3.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  6. 3.4.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  7. 3.5.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  8. 3.6.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  9. 3.7.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException
  10. 3.8.x src/Exception/LingotekDocumentArchivedException.php \Drupal\lingotek\Exception\LingotekDocumentArchivedException

An exception for issues when a document is already archived.

@package Drupal\lingotek\Exception

Hierarchy

Expanded class hierarchy of LingotekDocumentArchivedException

18 files declare their use of LingotekDocumentArchivedException
lingotek.batch.inc in ./lingotek.batch.inc
Lingotek batch functions
lingotek.module in ./lingotek.module
Implements Drupal-related hooks for the Lingotek Translation module.
Lingotek.php in src/Lingotek.php
LingotekConfigManagementForm.php in src/Form/LingotekConfigManagementForm.php
LingotekConfigTranslationController.php in src/Controller/LingotekConfigTranslationController.php

... See full list

File

src/Exception/LingotekDocumentArchivedException.php, line 10

Namespace

Drupal\lingotek\Exception
View source
class LingotekDocumentArchivedException extends LingotekException {

  /**
   * The document id.
   *
   * @var string
   */
  protected $documentId;

  /**
   * Construct the exception. Note: The message is NOT binary safe.
   *
   * @param string $document_id
   *   The document id.
   * @param string $message
   *   (optional) The Exception message to throw.
   * @param int $code
   *   (optional) The Exception code.
   * @param \Throwable $previous
   *   (optional) The previous throwable used for the exception chaining.
   */
  public function __construct($document_id, $message = "", int $code = 0, \Throwable $previous = NULL) {
    parent::__construct($message, $code, $previous);
    $this->documentId = $document_id;
  }

  /**
   * Get the document id which was already archived.
   *
   * @return string
   */
  public function getDocumentId() {
    return $this->documentId;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LingotekDocumentArchivedException::$documentId protected property The document id.
LingotekDocumentArchivedException::getDocumentId public function Get the document id which was already archived.
LingotekDocumentArchivedException::__construct public function Construct the exception. Note: The message is NOT binary safe.