You are here

protected function NodeMakeUnsticky::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/NodeMakeUnsticky.php, line 32

Class

NodeMakeUnsticky
Makes a content item not sticky.

Namespace

Drupal\rules\Plugin\RulesAction

Code

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