[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/filefield/ -> filefield.module (summary)

(no description)

File Size: 1143 lines (39 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 44 functions

  filefield_init()
  filefield_menu()
  filefield_elements()
  filefield_theme()
  filefield_file_download()
  filefield_views_api()
  filefield_form_alter()
  filefield_field_info()
  filefield_field_settings()
  filefield_field()
  filefield_widget_settings()
  filefield_widget()
  filefield_widget_upload_validators()
  filefield_content_is_empty()
  filefield_content_diff_values()
  filefield_default_value()
  filefield_widget_info()
  filefield_field_formatter_info()
  filefield_content_generate()
  filefield_data_info()
  filefield_data_value()
  filefield_filefield_data_info()
  filefield_icon_url()
  filefield_filefield_icon_sets()
  filefield_edit_access()
  filefield_view_access()
  filefield_js()
  filefield_progress()
  filefield_progress_implementation()
  filefield_file_references()
  filefield_file_delete()
  filefield_validate_extensions()
  filefield_validate_extensions_help()
  filefield_validate_size()
  filefield_validate_size_help()
  filefield_validate_image_resolution()
  filefield_validate_image_resolution_help()
  filefield_validate_is_image()
  filefield_validate_associate_field()
  filefield_get_field_list()
  filefield_get_file_reference_count()
  filefield_get_file_references()
  filefield_get_node_files()
  filefield_delete_file_references()

Functions
Functions that are not part of a class:

filefield_init()   X-Ref
Implementation of hook_init().


filefield_menu()   X-Ref
Implementation of hook_menu().


filefield_elements()   X-Ref
Implementation of hook_elements().


filefield_theme()   X-Ref
Implementation of hook_theme().


filefield_file_download($filepath)   X-Ref
Implementation of hook_file_download().


filefield_views_api()   X-Ref
Implementation of hook_views_api().


filefield_form_alter(&$form, $form_state, $form_id)   X-Ref
Implementation of hook_form_alter().

Set the enctype on forms that need to accept file uploads.

filefield_field_info()   X-Ref
Implementation of CCK's hook_field_info().


filefield_field_settings($op, $field)   X-Ref
Implementation of hook_field_settings().


filefield_field($op, $node, $field, &$items, $teaser, $page)   X-Ref
Implementation of CCK's hook_field().


filefield_widget_settings($op, $widget)   X-Ref
Implementation of CCK's hook_widget_settings().


filefield_widget(&$form, &$form_state, $field, $items, $delta = 0)   X-Ref
Implementation of hook_widget().


filefield_widget_upload_validators($field)   X-Ref
Get the upload validators for a file field.

param: $field
return:

filefield_content_is_empty($item, $field)   X-Ref
Implementation of CCK's hook_content_is_empty().

The result of this determines whether content.module will save the value of
the field. Note that content module has some interesting behaviors for empty
values. It will always save at least one record for every node revision,
even if the values are all NULL. If it is a multi-value field with an
explicit limit, CCK will save that number of empty entries.

filefield_content_diff_values($node, $field, $items)   X-Ref
Implementation of CCK's hook_content_diff_values().


filefield_default_value(&$form, &$form_state, $field, $delta)   X-Ref
Implementation of CCK's hook_default_value().

Note this is a widget-level hook, so it does not affect ImageField or other
modules that extend FileField.


filefield_widget_info()   X-Ref
Implementation of CCK's hook_widget_info().


filefield_field_formatter_info()   X-Ref
Implementation of CCK's hook_field_formatter_info().


filefield_content_generate($node, $field)   X-Ref
Implementation of CCK's hook_content_generate(). Used by generate.module.


filefield_data_info()   X-Ref
Get a list of possible information stored in a file field "data" column.


filefield_data_value($key, $value)   X-Ref
Given an array of data options, dispatch the necessary callback function.


filefield_filefield_data_info()   X-Ref
Implementation of hook_filefield_data_info().

Define a list of values that this module stores in the "data" column of a
file field. The callback function receives the portion of the data column
defined by key and should return a value suitable for printing to the page.

filefield_icon_url($file)   X-Ref
Determine the most appropriate icon for the given file's mimetype.

param: $file
return:

filefield_filefield_icon_sets()   X-Ref
Implementation of hook_filefield_icon_sets().

Define a list of icon sets and directories that contain the icons.

filefield_edit_access($type_name, $field_name)   X-Ref
Access callback for the JavaScript upload and deletion AHAH callbacks.

The content_permissions module provides nice fine-grained permissions for
us to check, so we can make sure that the user may actually edit the file.

filefield_view_access($field_name, $node = NULL)   X-Ref
Access callback that checks if the current user may view the filefield.


filefield_js($type_name, $field_name, $delta)   X-Ref
Menu callback; Shared AHAH callback for uploads and deletions.

This rebuilds the form element for a particular field item. As long as the
form processing is properly encapsulated in the widget element the form
should rebuild correctly using FAPI without the need for additional callbacks
or processing.

filefield_progress($key)   X-Ref
Menu callback for upload progress.


filefield_progress_implementation()   X-Ref
Determine which upload progress implementation to use, if any available.


filefield_file_references($file)   X-Ref
Implementation of hook_file_references().


filefield_file_delete($file)   X-Ref
Implementation of hook_file_delete().


filefield_validate_extensions($file, $extensions)   X-Ref
An #upload_validators callback. Check the file matches an allowed extension.

If the mimedetect module is available, this will also validate that the
content of the file matches the extension. User #1 is included in this check.

param: $file
param: $extensions
return:

filefield_validate_extensions_help($extensions)   X-Ref
Help text automatically appended to fields that have extension validation.


filefield_validate_size($file, $file_limit = 0, $user_limit = 0)   X-Ref
An #upload_validators callback. Check the file size does not exceed a limit.

param: $file
param: $file_limit
param: $file_limit
return:

filefield_validate_size_help($size)   X-Ref
Automatic help text appended to fields that have file size validation.


filefield_validate_image_resolution(&$file, $maximum_dimensions = 0, $minimum_dimensions = 0)   X-Ref
An #upload_validators callback. Check an image resolution.

param: $file
param: $max_size
param: $min_size
return:

filefield_validate_image_resolution_help($max_size = '0', $min_size = '0')   X-Ref
Automatic help text appended to fields that have image resolution validation.


filefield_validate_is_image(&$file)   X-Ref
An #upload_validators callback. Check that a file is an image.

This check should allow any image that PHP can identify, including png, jpg,
gif, tif, bmp, psd, swc, iff, jpc, jp2, jpx, jb2, xbm, and wbmp.

This check should be combined with filefield_validate_extensions() to ensure
only web-based images are allowed, however it provides a better check than
extension checking alone if the mimedetect module is not available.

param: $file
return:

filefield_validate_associate_field(&$file, $field)   X-Ref
An #upload_validators callback. Add the field to the file object.

This validation function adds the field to the file object for later
use in field aware modules implementing hook_file. It's not truly a
validation at all, rather a convient way to add properties to the uploaded
file.

filefield_get_field_list($node_type = NULL, $field = NULL)   X-Ref
Return an array of file fields within a node type or by field name.

param: $field
param: $node_type

filefield_get_file_reference_count($file, $field = NULL)   X-Ref
Count the number of times the file is referenced within a field.

param: $file
param: $field
return:

filefield_get_file_references($file, $field = NULL)   X-Ref
Get a list of node IDs that reference a file.

param: $file
param: $field
return:

filefield_get_node_files($node, $field = NULL)   X-Ref
Get all FileField files connected to a node ID.

param: $nid
param: $field_name
return:

filefield_delete_file_references($file, $field = NULL)   X-Ref
Delete all node references of a file.

param: $file
param: $field



Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7