You are here

public function OpignoNotification::getUrl in Opigno notifications 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoNotification.php \Drupal\opigno_notification\Entity\OpignoNotification::getUrl()

File

src/Entity/OpignoNotification.php, line 217

Class

OpignoNotification
Defines the opigno_notification entity.

Namespace

Drupal\opigno_notification\Entity

Code

public function getUrl() {
  $value = $this
    ->get('url')
    ->getValue();
  if (!isset($value)) {
    return '/notifications';
  }
  return $value[0]['value'];
}