You are here

function relation_get_relation_types_options in Relation 8.2

Same name and namespace in other branches
  1. 8 relation.module \relation_get_relation_types_options()

Returns all relation types suitable for #options property on elements.

2 calls to relation_get_relation_types_options()
EntityCollector::buildForm in relation_entity_collector/src/Form/EntityCollector.php
Form constructor.
relation_migrate_configuration_form in relation_migrate/relation_migrate.module
Configuration form callback.
1 string reference to 'relation_get_relation_types_options'
relation_rules_action_info in ./relation.rules.inc
Implements hook_rules_action_info().

File

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

Code

function relation_get_relation_types_options() {
  $options = array();
  foreach (RelationType::loadMultiple() as $relation_type) {
    $options[$relation_type
      ->id()] = $relation_type
      ->label();
  }
  return $options;
}