public function SitewideAlert::getStyleClass in Sitewide Alert 8
Gets the style class to use for the alert.
Return value
string The style class to use.
Overrides SitewideAlertInterface::getStyleClass
File
- src/
Entity/ SitewideAlert.php, line 479
Class
- SitewideAlert
- Defines the Sitewide Alert entity.
Namespace
Drupal\sitewide_alert\EntityCode
public function getStyleClass() : string {
return Html::cleanCssIdentifier('alert-' . $this
->get('style')->value);
}