public static function NodeHelper::publishNode in Node expire 7.2
Publishes node by $nid.
1 call to NodeHelper::publishNode()
- ActionsHandler::doAction in src/
Module/ CommonExpire/ Actions/ ActionsHandler.php - Executes particular action with the node..
File
- src/
Module/ CommonExpire/ Node/ NodeHelper.php, line 18 - NodeHelper class.
Class
- NodeHelper
- NodeHelper class.
Namespace
Drupal\node_expire\Module\CommonExpire\NodeCode
public static function publishNode($nid) {
// Load the node object.
$node = node_load($nid);
// Set status property to 1.
$node->status = 1;
// Save the node.
node_save($node);
}