You are here

protected function NodeUnpromote::doExecute in Rules 8.3

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\RulesAction

Code

protected function doExecute(NodeInterface $node) {
  $node
    ->setPromoted(NodeInterface::NOT_PROMOTED);
}