function farm_constraint_list in farmOS 7
Function for generating a list of constraints for a given entity.
Parameters
$type: The entity type.
$bundle: The entity bundle.
$id: The entity id.
Return value
array Returns an array of constraints preventing an entity from being deleted.
2 calls to farm_constraint_list()
- farm_constraint_exists in modules/
farm/ farm_constraint/ farm_constraint.module - Function for checking if a constraint exists (if a record is referenced by other records).
- farm_plan_record_unlink_form in modules/
farm/ farm_plan/ farm_plan.pages.inc - Generic form for removing a record from a plan, and optionally deleting it.
File
- modules/
farm/ farm_constraint/ farm_constraint.module, line 61 - Farm constraint module.
Code
function farm_constraint_list($type, $bundle, $id) {
// Ask other modules if they are aware of any constraints.
$constraints = module_invoke_all('farm_constraint', $type, $bundle, $id);
// Return the constraints.
return $constraints;
}