function theme_clocks in Clock 7.2
Returns HTML for a list of clocks.
1 theme call to theme_clocks()
- clock_block_view in ./
clock.module - Implements hook_block_view().
File
- ./
clock.theme.inc, line 11 - Theme-related functions for Clock module.
Code
function theme_clocks($variables) {
$clocks = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'clock-clocks',
),
),
);
foreach ($variables['clocks'] as $cid => $clock) {
$clocks[$cid] = array(
'#theme' => 'clock',
'#clock' => $clock,
'#prefix' => '<div class="clock-clock-wrapper clock-clock-wrapper-' . $cid . '">',
'#suffix' => '</div>',
);
// @todo This currently somewhat works, but overrides the top-level block links.
/** $clocks["clock-$cid-contextual-links"] = array(
'#theme' => 'links__contextual',
'#links' => array(
"clock-$cid-edit" => array(
'title' => t('Edit'),
'href' => "admin/structure/block/manage/clock/clock/configure/$cid/edit"
),
"clock-$cid-delete" => array(
'title' => t('Delete'),
'href' => "admin/structure/block/manage/clock/clock/configure/$cid/delete"
),
),
'#prefix' => '<div class="contextual-links-wrapper">',
'#suffix' => '</div>',
'#attributes' => array('class' => array('contextual-links')),
'#attached' => array('library' => array(array('contextual', 'contextual-links'))),
);*/
}
return render($clocks);
}