function agenda_settings in Agenda 7.2
Same name and namespace in other branches
- 6.2 agenda.module \agenda_settings()
- 6 agenda.module \agenda_settings()
- 7 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 240
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;
}