function NodePromote::doExecute

Executes the action with the given context.

Parameters

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

File

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

Class

NodePromote
Promotes a content item.

Namespace

Drupal\rules\Plugin\RulesAction

Code

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