You are here

public function UnableToConnectException::__construct in Bynder 8

Same name and namespace in other branches
  1. 8.3 src/Exception/UnableToConnectException.php \Drupal\bynder\Exception\UnableToConnectException::__construct()
  2. 8.2 src/Exception/UnableToConnectException.php \Drupal\bynder\Exception\UnableToConnectException::__construct()
  3. 4.0.x src/Exception/UnableToConnectException.php \Drupal\bynder\Exception\UnableToConnectException::__construct()

Constructs UnableToConnectException.

Overrides BynderException::__construct

File

src/Exception/UnableToConnectException.php, line 15

Class

UnableToConnectException
Exception indicating that the selected bundle does not exist.

Namespace

Drupal\bynder\Exception

Code

public function __construct() {
  $log_message = 'Unable to connect to Bynder. Check if the  <a target="_blank" href=":url">configuration is set properly</a> or contact <a href=":support">support</a>.';
  $log_message_args = [
    ':url' => Url::fromRoute('bynder.configuration_form')
      ->toString(),
    ':support' => 'mailto:support@getbynder.com',
  ];
  $admin_message = $this
    ->t($log_message, $log_message_args);
  $message = $this
    ->t('Unable to connect to Bynder. Please contact the site administrator.');
  parent::__construct($message, $admin_message, $log_message, $log_message_args);
}