function name_format in Name Field 6
Same name and namespace in other branches
- 7 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 object is used for Token module subsitutions. 'type' - A string. The object identifier: node, user, etc
4 calls to name_format()
- NameTestHelper::assertNameFormats in tests/
name.test - name_list_custom_formats in ./
name.admin.inc - Lists the known custom formats.
- theme_name_formatter_default in ./
name.module - Theme function all name field formatters.
- _name_token_values in includes/
name.token.inc - Implementation of hook_token_values().
File
- ./
name.module, line 59 - 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);
}