You are here

function hook_farm_quick_forms in farmOS 7

Define quick forms provided by this module

Related topics

4 functions implement hook_farm_quick_forms()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

farm_crop_farm_quick_forms in modules/farm/farm_crop/farm_crop.farm_quick.inc
Implements hook_farm_quick_forms().
farm_livestock_farm_quick_forms in modules/farm/farm_livestock/farm_livestock.farm_quick.inc
Implements hook_farm_quick_forms().
farm_soil_compost_farm_quick_forms in modules/farm/farm_soil/farm_soil_compost/farm_soil_compost.farm_quick.inc
Implements hook_farm_quick_forms().
farm_soil_farm_quick_forms in modules/farm/farm_soil/farm_soil.farm_quick.inc
Implements hook_farm_quick_forms().
1 invocation of hook_farm_quick_forms()
farm_quick_forms in modules/farm/farm_quick/farm_quick.module
Load information about all quick forms provided by other modules.

File

modules/farm/farm_quick/farm_quick.api.php, line 27
Hooks provided by farm_quick.

Code

function hook_farm_quick_forms() {
  return array(
    'myform' => array(
      // This will be displayed as the title of the tab under "Quick forms".
      'label' => t('My form'),
      // This permission will be required to access the form.
      // This can either be a single permission string OR an array of permission
      // strings.
      'permission' => array(
        'create farm_birth log entities',
        'create animal farm_asset entities',
      ),
      // The form callback function.
      'form' => 'my_quick_form',
      // If the quick form functions are stored in a separate PHP file, specify
      // that as follows (relative to the module's directory).
      'file' => 'mymodule.farm_quick.inc',
    ),
  );
}