You are here

public function OpignoNotification::getHasRead in Opigno notifications 8

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

Gets the notification status.

Return value

bool The status of the notification.

Overrides OpignoNotificationInterface::getHasRead

File

src/Entity/OpignoNotification.php, line 196

Class

OpignoNotification
Defines the opigno_notification entity.

Namespace

Drupal\opigno_notification\Entity

Code

public function getHasRead() {
  $value = $this
    ->get('has_read')
    ->getValue();
  if (!isset($value)) {
    return NULL;
  }
  return $value[0]['value'];
}