You are here

function agenda_variable_get in Agenda 7.2

Same name and namespace in other branches
  1. 6.2 agenda.module \agenda_variable_get()
  2. 6 agenda.module \agenda_variable_get()
  3. 7 agenda.module \agenda_variable_get()

Get a variable

Parameters

int $delta The ID of the agenda:

string $parameter The parameter required:

string $default_value (optional) The default value:

3 calls to agenda_variable_get()
agenda_admin_configure in ./agenda.admin.php
Manage agenda
agenda_block_info in ./agenda.module
Implements hook_block_info().
agenda_debug in ./agenda.admin.php
Provide a page to debug a calendar ID that is not working

File

./agenda.module, line 264

Code

function agenda_variable_get($delta, $parameter, $default_value) {
  $value = db_query("SELECT value FROM {agenda} WHERE bid = :bid AND name = :name", array(
    ':bid' => $delta,
    ':name' => $parameter,
  ))
    ->fetchField();
  if ($value === FALSE) {
    $value = $default_value;
  }
  return $value;
}