function hook_filefield_paths_field_settings in File (Field) Paths 7
Same name and namespace in other branches
- 8 filefield_paths.api.php \hook_filefield_paths_field_settings()
Define field(s) to be displayed on the File (Field) Paths settings form and used during the processing of uploaded files.
Parameters
$field: The field definition this File (Field) Paths settings field applies to.
$instance: The field instance this File (Field) Paths settings field applies to.
Return value
array An array whose keys are field names and whose values are arrays defining the field, with the following key/value pairs:
- title: The title fo the field.
- form: A keyed array of Form API elements.
See also
hook_filefield_paths_process_file().
1 function implements hook_filefield_paths_field_settings()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- filefield_paths_filefield_paths_field_settings in modules/
filefield_paths.inc - Implements hook_filefield_paths_field_settings().
1 invocation of hook_filefield_paths_field_settings()
- filefield_paths_form_alter in ./
filefield_paths.module - Implements hook_form_alter().
File
- ./
filefield_paths.api.php, line 25 - Hooks provided by the File (Field) Paths module.
Code
function hook_filefield_paths_field_settings($field, $instance) {
return array(
'file_path' => array(
'title' => 'File path',
'form' => array(
'value' => array(
'#type' => 'textfield',
'#title' => t('File path'),
'#maxlength' => 512,
'#size' => 128,
'#element_validate' => array(
'_file_generic_settings_file_directory_validate',
),
'#default_value' => $instance['settings']['file_directory'],
),
),
),
);
}