1 bootstrap.inc state_del($name)

Unsets a persistent state value.

Parameters

$name: The name of the state to delete.

See also

state_get()

state_set()

File

core/includes/bootstrap.inc, line 1435
Functions that need to be loaded on every Backdrop request.

Code

function state_del($name) {
  $states = &backdrop_static('states', array());
  db_delete('state')
    ->condition('name', $name)
    ->execute();
  cache('cache')->delete('states');
  if ($states && array_key_exists($name, $states)) {
    unset($states[$name]);
  }
}