You are here

function agenda_settings in Agenda 7

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

Retrieve the settings for a block

Parameters

int $delta The ID of the agenda:

string $parameter The parameter required:

3 calls to agenda_settings()
AgendaBlockTestCase::testNicknamedDays in ./agenda.test
agenda_debug in ./agenda.admin.php
Provide a page to debug a calendar ID that is not working
agenda_display_block in ./agenda.module
Generate the themed agenda block.

File

./agenda.module, line 177

Code

function agenda_settings($delta) {
  $res = db_query('SELECT name, value FROM {agenda} WHERE bid = :bid', array(
    ':bid' => $delta,
  ));
  $settings = new stdClass();
  $settings->bid = $delta;
  while ($row = $res
    ->fetchAssoc()) {
    $settings->{$row['name']} = $row['value'];
  }
  if (!count($settings) || !isset($settings->title)) {
    $settings = FALSE;
  }
  return $settings;
}