public function BynderException::displayMessage in Bynder 8
Same name and namespace in other branches
- 8.3 src/Exception/BynderException.php \Drupal\bynder\Exception\BynderException::displayMessage()
- 8.2 src/Exception/BynderException.php \Drupal\bynder\Exception\BynderException::displayMessage()
- 4.0.x src/Exception/BynderException.php \Drupal\bynder\Exception\BynderException::displayMessage()
Displays message to the user.
File
- src/
Exception/ BynderException.php, line 68
Class
- BynderException
- Base exception class for Bynder.
Namespace
Drupal\bynder\ExceptionCode
public function displayMessage() {
if (\Drupal::currentUser()
->hasPermission($this->adminPermission)) {
drupal_set_message($this->adminMessage, $this->messageLevel);
}
else {
drupal_set_message($this
->getMessage(), $this->messageLevel);
}
}