You are here

function farm_quick_forms in farmOS 7

Load information about all quick forms provided by other modules.

2 calls to farm_quick_forms()
farm_quick_configure_form in modules/farm/farm_quick/farm_quick.module
Form for configuring quick forms.
farm_quick_menu in modules/farm/farm_quick/farm_quick.module
Implements hook_menu().

File

modules/farm/farm_quick/farm_quick.module, line 49
Code for the Farm Quick module.

Code

function farm_quick_forms() {

  // Ask modules for quick forms.
  $forms = array();
  $modules = module_implements('farm_quick_forms');
  foreach ($modules as $module) {
    $module_forms = module_invoke($module, 'farm_quick_forms');
    foreach ($module_forms as &$form) {
      $form['module'] = $module;
    }
    $forms = array_merge($forms, $module_forms);
  }

  // Sort the quick forms.
  uasort($forms, 'farm_quick_forms_sort');

  // Return the array of quick forms.
  return $forms;
}