summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module27
1 files changed, 12 insertions, 15 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index e21728c9d..f17aa1b4e 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -983,16 +983,6 @@ function taxonomy_field_info() {
/**
* Implements hook_field_widget_info().
- *
- * We need custom handling of multiple values because we need
- * to combine them into a options list rather than display
- * cardinality elements. We will use the field module's default
- * handling for default values.
- *
- * Callbacks can be omitted if default handing is used.
- * They're included here just so this module can be used
- * as an example for custom modules that might do things
- * differently.
*/
function taxonomy_field_widget_info() {
return array(
@@ -1019,6 +1009,13 @@ function taxonomy_field_widget_info_alter(&$info) {
}
/**
+ * Implements hook_options_list().
+ */
+function taxonomy_options_list($field) {
+ return taxonomy_allowed_values($field);
+}
+
+/**
* Implements hook_field_schema().
*/
function taxonomy_field_schema($field) {
@@ -1122,12 +1119,12 @@ function taxonomy_field_formatter($object_type, $object, $field, $instance, $lan
}
/**
- * Create an array of the allowed values for this field.
+ * Returns the set of valid terms for a taxonomy field.
*
- * Call the field's allowed_values function to retrieve the allowed
- * values array.
- *
- * @see _taxonomy_term_select()
+ * @param $field
+ * The field definition.
+ * @return
+ * The array of valid terms for this field, keyed by term id.
*/
function taxonomy_allowed_values($field) {
$options = array();