You are here

function name_format in Name Field 7

Same name and namespace in other branches
  1. 6 name.module \name_format()

This is the main function that formats a name from an array of components.

Parameters

array $name_components: A keyed array of name components. These are: title, given, middle, family, generational and credentials.

string $format: The string specifying what format to use.

array $settings: A keyed array of additional parameters to pass into the function. Includes: 'object' - An object or array. This entity is used for Token module subsitutions. Currently not used. 'type' - A string. The entity identifier: node, user, etc.

8 calls to name_format()
NameTestHelper::assertNameFormats in tests/name.test
name_field_diff_view in ./name.diff.inc
Diff field callback for parsing name field comparative values.
name_field_formatter_settings_summary in ./name.module
Implements hook_field_formatter_settings_summary().
name_field_formatter_view in ./name.module
Implements hook_field_formatter_view().
name_list_custom_formats in ./name.admin.inc
Lists the known custom formats.

... See full list

File

./name.module, line 33
Defines an API for displaying and inputing names.

Code

function name_format($name_components, $format, $settings = array()) {
  module_load_include('inc', 'name', 'includes/name.parser');
  return _name_format($name_components, $format, $settings);
}