function i18nblocks_block in Internationalization 5
Same name and namespace in other branches
- 5.3 i18nblocks/i18nblocks.module \i18nblocks_block()
- 5.2 i18nblocks/i18nblocks.module \i18nblocks_block()
Implementation of hook_block()
File
- i18nblocks/
i18nblocks.module, line 41
Code
function i18nblocks_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks = array();
$result = db_query("SELECT * FROM {i18n_blocks}");
while ($data = db_fetch_object($result)) {
$blocks[$data->delta]['info'] = $data->info;
}
return $blocks;
case 'view':
return i18nblocks_get_block($delta, i18n_get_lang());
break;
case 'configure':
return i18nblocks_form(i18nblocks_get_metablock($delta, TRUE), $delta);
case 'save':
i18nblocks_save($edit, $delta);
break;
}
}