function fz152_get_forms in FZ152 7
Return array with form_id's and weight for checkbox if available.
@example array( 0 => array( 'form_id' => 'news_node_form', 'weight' => 99, ), 1 => array( 'form_id' => 'article_node_form', 'weight' => NULL, ), ); @endexample
1 string reference to 'fz152_get_forms'
- fz152_fz152_info in ./
fz152.module - Implements hook_fz152_info().
File
- ./
fz152.module, line 161 - Main file for hooks and custom functions.
Code
function fz152_get_forms() {
$forms_value = variable_get_value('fz152_forms');
$forms = array();
if (!empty($forms_value)) {
foreach (explode(PHP_EOL, $forms_value) as $form_id) {
$form_id_exploded = explode('|', $form_id);
$forms[] = array(
'form_id' => $form_id_exploded[0],
'weight' => isset($form_id_exploded[1]) ? $form_id_exploded[1] : NULL,
);
}
}
return $forms;
}