function NodeMakeSticky::doExecute

Executes the action with the given context.

Parameters

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

File

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

Class

NodeMakeSticky
Makes a content item sticky.

Namespace

Drupal\rules\Plugin\RulesAction

Code

protected function doExecute(NodeInterface $node) {
    $node->setSticky(NodeInterface::STICKY);
}