API page: http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/func...

Describe the problem you have found:

The minimum what an vocabulary object should look like should be described. Users with smart IDEs and Intellisense will benefit from that quick information. Even if it is just $voc = (object) array('name' => 'foobar'));

Just like here: http://drupal.org/node/1162226 were the term definition was added nicely.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with taxonomy_vocabulary_save » taxonomy_vocabulary_save doc needs more detail
Version: 7.2 » 8.x-dev
Issue tags: +Needs backport to D7

Thanks for reporting! We fix in 8.x then port back to 7.x

You've reported about a dozen issues today. Would you consider making patches for some of them? Thanks.

Also, if you could consider when you make an issue report:
- Change the version to 8.x, rather than changing it to a specific 7.x version as you did on all the issues you filed.
- Change the title to something meaningful.
Both of these would save me having to do them for you. Thanks!

ro-no-lo’s picture

okay, will keep that in mind for the next. :-)

James_Stallings’s picture

Status: Active » Needs review
FileSize
1.09 KB

I followed the term summary linked in the issue summary as a guide. I'm unsure about the following: module (when would it ever be anything but taxonomy), weight (why are vocabularies weighted?), return.

James_Stallings’s picture

I should have re-read that patch one more time.

jhodgdon’s picture

Status: Needs review » Needs work

Looks pretty good, a few changes:

a) First line: Save -> Saves.

b) This line needs to end in :
+ * A vocabulary object with the following properties.

c) This line might be clearer if it said the "human-readable" name:
+ * - name: The name of the vocabulary.

d)
+ * - weight: The weight of the vocabulary in relation to other vocabularies
+ * within the same taxonomy.

I think "within the same taxonomy" should be omitted.

e) Looking at the code in the function, there are a couple of other components, such as ->original, which aren't mentioned. You might scan and see what else is there, and make sure they're all documented.

James_Stallings’s picture

Assigned: Unassigned » James_Stallings
Status: Needs work » Active
James_Stallings’s picture

Status: Active » Needs review
FileSize
1.22 KB
James_Stallings’s picture

Assigned: James_Stallings » Unassigned
jhodgdon’s picture

Status: Needs review » Needs work

This looks great! The only thing that should be fixed is line wrapping. One of these two lines must be wrong (either the first line is > 80 or the 2nd needs to have a word or two moved up from the 3rd):

+ *   - weight: The weight of this vocabulary in relation to other vocabularies.
+ *   - original: The original vocabulary object before any changes
+ *     are applied.

Also, did you check the code and make sure 'original' was the only other component missing?

James_Stallings’s picture

Status: Needs work » Needs review
FileSize
1.29 KB

Yes, I missed old_machine_name too.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks! D8/7.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x and 7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.