function NodeUnpublish::doExecute
Unpublishes the Node.
Parameters
\Drupal\Core\Entity\NodeInterface $node: The node to modify.
File
-
src/
Plugin/ RulesAction/ NodeUnpublish.php, line 32
Class
- NodeUnpublish
- Unpublishes a content item.
Namespace
Drupal\rules\Plugin\RulesActionCode
protected function doExecute(NodeInterface $node) {
$node->setUnpublished();
}