You are here

function simplenews_issue_update_sent_status in Simplenews 8

Same name and namespace in other branches
  1. 7.2 simplenews.module \simplenews_issue_update_sent_status()

Update the sent status of a node.

If the node part of a translation set, all corresponding translations are updated as well.

Parameters

$node: The node object to be updated.

$status: The new status, defaults to SIMPLENEWS_STATUS_SEND_PENDING.

Related topics

2 calls to simplenews_issue_update_sent_status()
SendIssue::executeMultiple in src/Plugin/Action/SendIssue.php
Executes the plugin for an array of objects.
simplenews_demo_install in modules/simplenews_demo/simplenews_demo.install

File

./simplenews.module, line 1047
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_issue_update_sent_status(NodeInterface $node, $status = SIMPLENEWS_STATUS_SEND_PENDING) {
  $node->simplenews_issue->status = $status;
  $node
    ->save();
}