public function Subscriber::setStatus in Simplenews 8.2
Same name and namespace in other branches
- 8 src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::setStatus()
- 3.x src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::setStatus()
Sets the status of the subscriber.
Parameters
bool $status: The subscribers status.
Overrides SubscriberInterface::setStatus
1 call to Subscriber::setStatus()
- Subscriber::fillFromAccount in src/
Entity/ Subscriber.php - Fill values from a user account.
File
- src/
Entity/ Subscriber.php, line 83
Class
- Subscriber
- Defines the simplenews subscriber entity.
Namespace
Drupal\simplenews\EntityCode
public function setStatus($status) {
$this
->set('status', $status ? SubscriberInterface::ACTIVE : SubscriberInterface::INACTIVE);
}