You are here

function name_get_custom_formats in Name Field 7

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

Loads a list of all user defined formats.

2 calls to name_get_custom_formats()
name_get_custom_format_options in ./name.module
Helper function to generate a list of all defined custom formatting options.
name_list_custom_formats in ./name.admin.inc
Lists the known custom formats.

File

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

Code

function name_get_custom_formats() {
  static $formats;
  if (!isset($formats)) {
    $formats = array();
    $result = db_query("SELECT * FROM {name_custom_format} ORDER BY name ASC");
    foreach ($result as $row) {
      $formats[$row->ncfid] = $row;
    }
  }
  return $formats;
}