You are here

public static function NodeHelper::promoteNode in Node expire 7.2

Promotes node to front page by $nid.

1 call to NodeHelper::promoteNode()
ActionsHandler::doAction in src/Module/CommonExpire/Actions/ActionsHandler.php
Executes particular action with the node..

File

src/Module/CommonExpire/Node/NodeHelper.php, line 66
NodeHelper class.

Class

NodeHelper
NodeHelper class.

Namespace

Drupal\node_expire\Module\CommonExpire\Node

Code

public static function promoteNode($nid) {

  // Load the node object.
  $node = node_load($nid);

  // Set promote property to 1.
  $node->promote = 1;

  // Save the node.
  node_save($node);
}