You are here

function entity_entity_property_edit_form in Entity API 7

1 string reference to 'entity_entity_property_edit_form'
entity_property.inc in ctools/relationships/entity_property.inc
Plugin to provide an relationship handler for any entity property.

File

ctools/relationships/entity_property.inc, line 86
Plugin to provide an relationship handler for any entity property.

Code

function entity_entity_property_edit_form($form, &$form_state) {
  $conf = $form_state['conf'];
  $form['selector'] = array(
    '#type' => 'textfield',
    '#title' => t('Data selector'),
    '#description' => t('Any valid data selector, e.g. "title" to select a node\'s title, or "field_tags:1" to select the second tag.'),
    '#default_value' => $conf['selector'],
    '#required' => TRUE,
  );
  $form['concatenator'] = array(
    '#title' => t('Concatenator (if multiple)'),
    '#type' => 'select',
    '#options' => array(
      ',' => ', (AND)',
      '+' => '+ (OR)',
    ),
    '#default_value' => $conf['concatenator'],
    '#prefix' => '<div class="clearfix">',
    '#suffix' => '</div>',
    '#description' => t("When the resulting value is multiple valued and the context is passed on to a view as argument, the value can be concatenated in the form of 1+2+3 (for OR) or 1,2,3 (for AND)."),
  );
  return $form;
}