function NodePublish::doExecute

Publishes the content.

Parameters

\Drupal\Core\Entity\NodeInterface $node: The node to modify.

File

src/Plugin/RulesAction/NodePublish.php, line 32

Class

NodePublish
Publishes a content item.

Namespace

Drupal\rules\Plugin\RulesAction

Code

protected function doExecute(NodeInterface $node) {
    $node->setPublished();
}