public function BundleNotExistException::__construct in Bynder 8.2
Same name and namespace in other branches
- 8.3 src/Exception/BundleNotExistException.php \Drupal\bynder\Exception\BundleNotExistException::__construct()
- 8 src/Exception/BundleNotExistException.php \Drupal\bynder\Exception\BundleNotExistException::__construct()
- 4.0.x src/Exception/BundleNotExistException.php \Drupal\bynder\Exception\BundleNotExistException::__construct()
Constructs BundleNotExistException.
Parameters
string $bundle: Name of the bundle.
Overrides BynderException::__construct
File
- src/
Exception/ BundleNotExistException.php, line 23
Class
- BundleNotExistException
- Exception indicating that the selected bundle does not exist.
Namespace
Drupal\bynder\ExceptionCode
public function __construct($bundle) {
$log_message = 'Media type @bundle does not exist. 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);
}