function file_entity_file_content_content_type_edit_form in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 plugins/content_types/file_content.inc \file_entity_file_content_content_type_edit_form()
Returns an edit form for this plugin.
File
- plugins/
content_types/ file_content.inc, line 56
Code
function file_entity_file_content_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$form['link'] = array(
'#title' => t('Link title to file'),
'#type' => 'checkbox',
'#default_value' => $conf['link'],
'#description' => t('Check this to make the title link to the file.'),
);
$entity_info = entity_get_info('file');
$build_mode_options = array();
foreach ($entity_info['view modes'] as $mode => $option) {
$build_mode_options[$mode] = $option['label'];
}
$form['view_mode'] = array(
'#title' => t('View mode'),
'#type' => 'select',
'#description' => t('Select a view mode for this node.'),
'#options' => $build_mode_options,
'#default_value' => $conf['view_mode'],
);
return $form;
}