class BrandNotSetException in Bynder 8.3
Same name and namespace in other branches
- 8 src/Exception/BrandNotSetException.php \Drupal\bynder\Exception\BrandNotSetException
- 8.2 src/Exception/BrandNotSetException.php \Drupal\bynder\Exception\BrandNotSetException
- 4.0.x src/Exception/BrandNotSetException.php \Drupal\bynder\Exception\BrandNotSetException
Exception indicating that the brand is not configured on upload widget.
Hierarchy
- class \Drupal\bynder\Exception\BynderException extends \Drupal\bynder\Exception\Exception uses MessengerTrait, StringTranslationTrait
- class \Drupal\bynder\Exception\BrandNotSetException
Expanded class hierarchy of BrandNotSetException
1 file declares its use of BrandNotSetException
- BynderUpload.php in src/
Plugin/ EntityBrowser/ Widget/ BynderUpload.php
File
- src/
Exception/ BrandNotSetException.php, line 10
Namespace
Drupal\bynder\ExceptionView source
class BrandNotSetException extends BynderException {
/**
* Constructs BrandNotSetException.
*
* @param string $entity_browser_id
* Entity browser ID.
*/
public function __construct($entity_browser_id) {
$log_message = 'Brand to upload to is not set. Check the <a target="_blank" href=":url">configuration of the widget</a>.';
$log_message_args = [
':url' => Url::fromRoute('entity.entity_browser.edit_form', [
'entity_browser' => $entity_browser_id,
'step' => 'widgets',
])
->toString(),
];
$admin_message = $this
->t($log_message, $log_message_args);
$message = $this
->t('Brand to upload to is not set. Please contact the site administrator.');
parent::__construct($message, $admin_message, $log_message, $log_message_args);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrandNotSetException:: |
public | function |
Constructs BrandNotSetException. Overrides BynderException:: |
|
BynderException:: |
protected | property | User-facing for admin users. | |
BynderException:: |
protected | property | Admin permission related to this exception. | 2 |
BynderException:: |
protected | property | Message to be logged in the Drupal's log. | |
BynderException:: |
protected | property | Arguments for the log message. | |
BynderException:: |
public | function | Displays message to the user. | |
BynderException:: |
public | function | Logs exception into Drupal's log. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |