function NodeUnpromote::doExecute
Executes the action with the given context.
Parameters
\Drupal\node\NodeInterface $node: The node to modify.
File
-
src/
Plugin/ RulesAction/ NodeUnpromote.php, line 32
Class
- NodeUnpromote
- Demotes a content item.
Namespace
Drupal\rules\Plugin\RulesActionCode
protected function doExecute(NodeInterface $node) {
$node->setPromoted(NodeInterface::NOT_PROMOTED);
}