You are here

function farm_plan_record_relationships in farmOS 7

Defines available relationships between plans and other record types.

Return value

array Returns an array of record types with the database table and field names used to store relationships. See farm_plan.api.php.

10 calls to farm_plan_record_relationships()
farm_plan_delete_form in modules/farm/farm_plan/farm_plan.pages.inc
Delete confirmation form.
farm_plan_entity_delete in modules/farm/farm_plan/farm_plan.module
Implements hook_entity_delete().
farm_plan_entity_view_alter in modules/farm/farm_plan/farm_plan.module
Implements hook_entity_view_alter().
farm_plan_farm_constraint in modules/farm/farm_plan/farm_plan.farm_constraint.inc
Implements hook_farm_constraint().
farm_plan_linked_records in modules/farm/farm_plan/farm_plan.module
Load a list of records associated with a plan.

... See full list

File

modules/farm/farm_plan/farm_plan.module, line 856
Farm plan - A farm plan entity type.

Code

function farm_plan_record_relationships() {

  // Ask modules for relationships.
  $relationships = module_invoke_all('farm_plan_record_relationships');

  // Set default values.
  foreach ($relationships as &$relationship) {
    if (!isset($relationship['required'])) {
      $relationship['required'] = TRUE;
    }
  }

  // Return the relationships.
  return $relationships;
}