function ctools_entity_from_query_string_settings_form

Settings form for the relationship.

1 string reference to 'ctools_entity_from_query_string_settings_form'
entity_from_query_string.inc in plugins/relationships/entity_from_query_string.inc
Plugin to provide an relationship handler for entities from query string.

File

plugins/relationships/entity_from_query_string.inc, line 45

Code

function ctools_entity_from_query_string_settings_form($form, &$form_state) {
  // Get all avalible enity types.
  foreach (entity_get_info() as $key => $value) {
    $entity_types[$key] = $value['label'];
  }
  $form['entity_type'] = array(
    '#title' => t('Entity type'),
    '#description' => t('Choose entity type to load from query value'),
    '#type' => 'select',
    '#options' => $entity_types,
  );
  if (isset($form_state['conf']['entity_type'])) {
    $form['entity_type']['#default_value'] = $form_state['conf']['entity_type'];
  }
  return $form;
}