function globallink_block_preview_content in GlobalLink Connect for Drupal 7.7
Helper function
1 string reference to 'globallink_block_preview_content'
- globallink_block_preview in globallink_block/
globallink_block_send.inc - Helper function
File
- globallink_block/
globallink_block_send.inc, line 408
Code
function globallink_block_preview_content() {
$id = arg(5);
$output = "";
$query = db_select('block_custom', 'bc')
->fields('bc', array(
'body',
'info',
))
->condition('bid', $id, '=');
$result = $query
->execute();
$result = $result
->fetchAll();
if (count($result) > 0) {
$output .= "<table><tr><th>Fields</th><th>Source Contents</th></tr>";
foreach ($result as $val) {
$output .= "<tr><td><strong>Block Info</strong></td><td>" . $val->info . "</td></tr>";
$output .= "<tr><td><strong>Body</strong></td><td>" . $val->body . "</td></tr>";
}
$output .= "</table>";
}
$form['preview'] = array(
'#markup' => $output,
);
return $form;
}