class BundleNotBynderException in Bynder 8
Same name and namespace in other branches
- 8.3 src/Exception/BundleNotBynderException.php \Drupal\bynder\Exception\BundleNotBynderException
- 8.2 src/Exception/BundleNotBynderException.php \Drupal\bynder\Exception\BundleNotBynderException
- 4.0.x src/Exception/BundleNotBynderException.php \Drupal\bynder\Exception\BundleNotBynderException
Exception indicating that the bundle does not represent Bynder assets.
Hierarchy
- class \Drupal\bynder\Exception\BynderException extends \Drupal\bynder\Exception\Exception uses StringTranslationTrait
- class \Drupal\bynder\Exception\BundleNotBynderException
Expanded class hierarchy of BundleNotBynderException
2 files declare their use of BundleNotBynderException
- BynderUpload.php in src/
Plugin/ EntityBrowser/ Widget/ BynderUpload.php - BynderWidgetBase.php in src/
Plugin/ EntityBrowser/ Widget/ BynderWidgetBase.php
File
- src/
Exception/ BundleNotBynderException.php, line 10
Namespace
Drupal\bynder\ExceptionView source
class BundleNotBynderException extends BynderException {
/**
* {@inheritdoc}
*/
protected $adminPermission = 'administer entity browsers';
/**
* Constructs BundleNotBynderException.
*
* @param string $bundle
* Name of the bundle.
*/
public function __construct($bundle) {
$log_message = 'Media bundle @bundle is not using Bynder plugin. Please fix the Bynder <a href=":eb_conf">search widget configuration</a>.';
$log_message_args = [
':eb_conf' => Url::fromRoute('entity.entity_browser.collection')
->toString(),
'@bundle' => $bundle,
];
$admin_message = $this
->t($log_message, $log_message_args);
$message = $this
->t('Bynder integration is not configured correctly. Please contact the site administrator.');
parent::__construct($message, $admin_message, $log_message, $log_message_args);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BundleNotBynderException:: |
protected | property |
Admin permission related to this exception. Overrides BynderException:: |
|
BundleNotBynderException:: |
public | function |
Constructs BundleNotBynderException. Overrides BynderException:: |
|
BynderException:: |
protected | property | User-facing for admin users. | |
BynderException:: |
protected | property | Message to be logged in the Drupal's log. | |
BynderException:: |
protected | property | Arguments for the log message. | |
BynderException:: |
protected | property | Message level to be used when displaying the message to the user. | |
BynderException:: |
public | function | Displays message to the user. | |
BynderException:: |
public | function | Logs exception into Drupal's log. | |
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. |