summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-28 15:28:20 -0400
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-28 15:28:20 -0400
commit7dc6896abf2fc068099dbdccec34a5d91b94a731 (patch)
tree56169b1643bf671fa10fe7272f0c4d0bf15b9d11 /modules/taxonomy
parent0f399a6dbff2e9b1b20af9be0a5bd3f2c76c1e30 (diff)
downloadbrdo-7dc6896abf2fc068099dbdccec34a5d91b94a731.tar.gz
brdo-7dc6896abf2fc068099dbdccec34a5d91b94a731.tar.bz2
Issue #1196116 by James_Stallings, foobar3000: Fixed taxonomy_vocabulary_save() doc needs more detail.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.module21
1 files changed, 20 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 2aa55a84c..db41a71a8 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -380,7 +380,26 @@ function taxonomy_admin_vocabulary_title_callback($vocabulary) {
}
/**
- * Save a vocabulary given a vocabulary object.
+ * Saves a vocabulary.
+ *
+ * @param $vocabulary
+ * A vocabulary object with the following properties:
+ * - vid: The ID of the vocabulary.
+ * - name: The human-readable name of the vocabulary.
+ * - machine_name: The machine name of the vocabulary.
+ * - description: (optional) The vocabulary's description.
+ * - hierarchy: The hierarchy level of the vocabulary.
+ * - module: (optional) The module altering the vocabulary.
+ * - weight: (optional) The weight of this vocabulary in relation to other
+ * vocabularies.
+ * - original: (optional) The original vocabulary object before any changes
+ * are applied.
+ * - old_machine_name: (optional) The original machine name of the
+ * vocabulary.
+ *
+ * @return
+ * Status constant indicating whether the vocabulary was inserted (SAVED_NEW)
+ * or updated(SAVED_UPDATED).
*/
function taxonomy_vocabulary_save($vocabulary) {
// Prevent leading and trailing spaces in vocabulary names.