You are here

function relation_get_type_label in Relation 7

Gets the label of the relation type of the given relation

Parameters

$relation: A relation object.

$reverse: optional: whether to get the reverse label (boolean).

Return value

The label of the relation type.

2 calls to relation_get_type_label()
relation_entity_collector_save in relation_entity_collector/relation_entity_collector.module
Submit handler for the save button.
relation_tokens in ./relation.tokens.inc
Implements hook_tokens().

File

./relation.module, line 1019
Describes relations between entities.

Code

function relation_get_type_label($relation, $reverse = FALSE) {
  $type = relation_type_load($relation->relation_type);
  if ($type->directional && $reverse) {
    return $type->reverse_label;
  }
  else {
    return $type->label;
  }
}