function context_reaction_delta::options_form in Delta 7.2
Same name and namespace in other branches
- 7.3 plugins/context/context_reaction_delta.inc \context_reaction_delta::options_form()
ugh
Overrides context_reaction::options_form
File
- plugins/
context_reaction_delta.inc, line 10
Class
- context_reaction_delta
- Expose themes as context reactions.
Code
function options_form($context) {
$values = $this
->fetch_from_context($context);
$form = array(
'#tree' => TRUE,
'#title' => t('Delta Override Template'),
);
$sql = "\n \t SELECT dt.name, dt.system_name, dt.tid \n \t FROM {delta_theme_settings} dt\n \t ORDER BY dt.name ASC";
$result = db_query($sql, array(), array(
'fetch' => PDO::FETCH_ASSOC,
));
$options = array();
foreach ($result as $item) {
$options[$item['system_name']] = $item['name'];
}
$form['delta_template'] = array(
'#type' => 'radios',
'#title' => t('Select Custom theme settings template.'),
'#default_value' => isset($values['delta_template']) ? $values['delta_template'] : '',
'#options' => $options,
);
return $form;
}