function webform_block in Webform 6.3
Implements hook_block().
File
- ./
webform.module, line 1563
Code
function webform_block($op = 'list', $delta = 0, $edit = array()) {
// Get the node ID from delta.
$nid = drupal_substr($delta, strrpos($delta, '-') + 1);
// The result will be FALSE if this is not a webform node block.
if ($op != 'list' && !db_result(db_query("SELECT block FROM {webform} WHERE nid = %d", $nid))) {
return;
}
switch ($op) {
case 'list':
return webform_block_info();
case 'view':
return webform_block_view($delta);
case 'configure':
return webform_block_configure($delta);
case 'save':
webform_block_save($delta, $edit);
break;
}
}