You are here

public function Subscriber::getStatus in Simplenews 8.2

Same name and namespace in other branches
  1. 8 src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getStatus()
  2. 3.x src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getStatus()

Returns if the subscriber is active or not.

Return value

bool The subscribers status.

Overrides SubscriberInterface::getStatus

File

src/Entity/Subscriber.php, line 76

Class

Subscriber
Defines the simplenews subscriber entity.

Namespace

Drupal\simplenews\Entity

Code

public function getStatus() {
  return $this
    ->get('status')->value == SubscriberInterface::ACTIVE;
}