function ife_load_form_ids in Inline Form Errors 7
Same name and namespace in other branches
- 6.2 ife.module \ife_load_form_ids()
- 6 ife.module \ife_load_form_ids()
- 7.2 ife.module \ife_load_form_ids()
Load all form ids from the data base
2 calls to ife_load_form_ids()
- ife_form_id_load in ./
ife.module - Menu loader function to fetch a form id.
- ife_settings_form in ./
ife.settings.inc - IFE settings form
File
- ./
ife.module, line 136 - Drupal hooks
Code
function ife_load_form_ids() {
static $ife_form_ids;
if ($ife_form_ids) {
$form_ids = $ife_form_ids;
}
else {
$cache = cache_get('ife_form_ids', 'cache');
if ($cache) {
$form_ids = $cache->data;
}
}
if (empty($form_ids)) {
$result = db_select('ife')
->fields('ife', array(
'form_id',
'field_types',
'status',
'display',
))
->orderBy('form_id')
->execute();
$form_ids = array();
foreach ($result as $row) {
$form_ids[$row->form_id] = $row;
}
cache_set('ife_form_ids', $form_ids, 'cache');
}
$ife_form_ids = $form_ids;
return $ife_form_ids;
}