function ctools_node_links_content_type_edit_form

Returns an edit form for the custom type.

File

plugins/content_types/node_context/node_links.inc, line 63

Code

function ctools_node_links_content_type_edit_form($form, &$form_state) {
    $conf = $form_state['conf'];
    $form['link'] = array(
        '#title' => t('Link title to node'),
        '#type' => 'checkbox',
        '#default_value' => $conf['link'],
        '#description' => t('Check here to make the title link to the node.'),
    );
    $entity = entity_get_info('node');
    $build_mode_options = array();
    foreach ($entity['view modes'] as $mode => $option) {
        $build_mode_options[$mode] = $option['label'];
    }
    $form['build_mode'] = array(
        '#title' => t('Build mode'),
        '#type' => 'select',
        '#description' => t('Select a build mode for this node.'),
        '#options' => $build_mode_options,
        '#default_value' => $conf['build_mode'],
    );
    $form['identifier'] = array(
        '#type' => 'textfield',
        '#default_value' => $conf['identifier'],
        '#title' => t('Identifier'),
        '#description' => t('Whatever is placed here will appear in @identifier, to help theme node links displayed on the panel', array(
            '@identifier' => $node->panel_identifier,
        )),
    );
    return $form;
}