You are here

public static function DbHandler::setExpired in Node expire 7.2

Sets node as expired by $nid.

Parameters

int $nid: Node ID that should set the expired flag.

1 call to DbHandler::setExpired()
CommonHookHandler::hookCron in src/Module/Hook/CommonHookHandler.php
Implements hook_cron().

File

src/Module/Db/DbHandler.php, line 21
DbHandler class.

Class

DbHandler
DbHandler class.

Namespace

Drupal\node_expire\Module\Db

Code

public static function setExpired($nid) {
  db_update('node_expire')
    ->fields(array(
    'expired' => 1,
    'lastnotify' => REQUEST_TIME,
  ))
    ->condition('nid', $nid)
    ->condition(db_or()
    ->condition('lastnotify', 0)
    ->condition('expired', 1, '!='))
    ->execute();
}