function fz152_webform_get_webform_info in FZ152 7
Return information about all entityforms on site, their machine name and label.
2 calls to fz152_webform_get_webform_info()
- fz152_webform_get_forms in module/
webform/ fz152_webform.module - Return forms to alter.
- fz152_webform_variable_info in module/
webform/ fz152_webform.variable.inc - Implements hook_variable_info().
File
- module/
webform/ fz152_webform.module, line 28 - Main file for hooks and custom functions. This module is provide integration with entityforms for fz152 module.
Code
function fz152_webform_get_webform_info() {
$result =& drupal_static(__FUNCTION__);
if (!isset($result)) {
$query = db_select('webform', 'w');
$query
->join('node', 'n', 'w.nid = n.nid');
$query
->fields('n');
$webforms = $query
->execute()
->fetchAllAssoc('nid');
$result = array();
foreach ($webforms as $webform) {
$result[] = array(
'id' => $webform->nid,
'label' => $webform->title,
);
}
}
return $result;
}