You are here

class UploadPermissionException in Bynder 8.2

Same name and namespace in other branches
  1. 8.3 src/Exception/UploadPermissionException.php \Drupal\bynder\Exception\UploadPermissionException
  2. 8 src/Exception/UploadPermissionException.php \Drupal\bynder\Exception\UploadPermissionException
  3. 4.0.x src/Exception/UploadPermissionException.php \Drupal\bynder\Exception\UploadPermissionException

Exception indicating that the User doesn't have upload permissions.

Hierarchy

Expanded class hierarchy of UploadPermissionException

1 file declares its use of UploadPermissionException
BynderUpload.php in src/Plugin/EntityBrowser/Widget/BynderUpload.php

File

src/Exception/UploadPermissionException.php, line 8

Namespace

Drupal\bynder\Exception
View source
class UploadPermissionException extends BynderException {

  /**
   * Constructs UploadFailedException.
   *
   * @param string $original_message
   *   Message that was originally thrown from the upload system.
   */
  public function __construct($original_message) {
    $log_message = "Unable to upload files to Bynder. Make sure your user account has enough permissions : @message";
    $log_message_args = [
      '@message' => $original_message,
    ];
    $admin_message = $this
      ->t($log_message, $log_message_args);
    $message = $this
      ->t("Unable to upload files to Bynder. Make sure your user account has enough permissions.");
    parent::__construct($message, $admin_message, $log_message, $log_message_args);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BynderException::$adminMessage protected property User-facing for admin users.
BynderException::$adminPermission protected property Admin permission related to this exception. 2
BynderException::$logMessage protected property Message to be logged in the Drupal's log.
BynderException::$logMessageArgs protected property Arguments for the log message.
BynderException::displayMessage public function Displays message to the user.
BynderException::logException public function Logs exception into Drupal's log.
MessengerTrait::$messenger protected property The messenger. 29
MessengerTrait::messenger public function Gets the messenger. 29
MessengerTrait::setMessenger public function Sets the messenger.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
UploadPermissionException::__construct public function Constructs UploadFailedException. Overrides BynderException::__construct