function agenda_install_fixtures in Agenda 7
Same name and namespace in other branches
- 7.2 agenda.install \agenda_install_fixtures()
Install an example block
1 call to agenda_install_fixtures()
- agenda_install in ./
agenda.install - Implements hook_install().
File
- ./
agenda.install, line 21 - Install, uninstall and scheme functions for the agenda module.
Code
function agenda_install_fixtures() {
$records = array(
array(
1,
'noeventstext',
'<p>No upcoming events</p>',
),
array(
1,
'timeformat',
'h:ia',
),
array(
1,
'dateformat',
'l, F jS',
),
array(
1,
'maxevents',
'60',
),
array(
1,
'datelimit',
'60',
),
array(
1,
'start',
'Jan 1st, 2009',
),
array(
1,
'end',
'April 1st, 2009',
),
array(
1,
'title',
'Example agenda block',
),
array(
1,
'linktext',
'View this event in Google Calendar',
),
array(
1,
'cachetime',
'3600',
),
array(
1,
'display_keys',
'start time, end date, end time, published, description, link',
),
array(
1,
'hide_labels',
'description, link',
),
array(
1,
'calendars',
'drupalagenda@gmail.com',
),
array(
1,
'timezone',
'UTC',
),
);
$query = db_insert('agenda')
->fields(array(
'bid',
'name',
'value',
));
foreach ($records as $record) {
$query
->values($record);
}
$query
->execute();
}