You are here

function file_aliases_filefield_paths_field_settings in File Aliases 7

Same name and namespace in other branches
  1. 5 file_aliases.module \file_aliases_filefield_paths_field_settings()
  2. 6 file_aliases.module \file_aliases_filefield_paths_field_settings()

Implements hook_filefield_paths_field_settings().

Parameters

$field:

$instance:

Return value

array

File

modules/filefield_paths.inc, line 16
FileField Paths module integration.

Code

function file_aliases_filefield_paths_field_settings($field, $instance) {
  return array(
    'file_alias' => array(
      'title' => 'File alias',
      'form' => array(
        'value' => array(
          '#type' => 'textfield',
          '#title' => t('File alias'),
          '#default_value' => drupal_substr(parse_url(file_create_url($field['settings']['uri_scheme'] . '://'), PHP_URL_PATH) . '[file:ffp-name-only-original].[file:ffp-extension-original]', 1),
          '#maxlength' => 512,
          '#size' => 128,
        ),
      ),
    ),
  );
}