You are here

function flag_flag_link_content_type_edit_form in Flag 7.3

Form callback.

File

plugins/content_types/flag_link/flag_link.inc, line 79

Code

function flag_flag_link_content_type_edit_form($form, &$form_state) {
  $conf = $form_state['conf'];
  $entity_type = $form_state['subtype_name'];
  $options = array();
  foreach (flag_get_flags($entity_type) as $flag) {
    $options[$flag->name] = $flag->title;
  }
  $form['flag_name'] = array(
    '#type' => 'select',
    '#title' => t('Flag name'),
    '#default_value' => $conf['flag_name'],
    '#options' => $options,
    '#description' => t('Select a flag.'),
    '#required' => TRUE,
    '#disabled' => !$options,
  );
  return $form;
}