Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294274

Clean-up procedural wrappers for taxonomy

$
0
0

Problem/Motivation

There's not a lot of usage taxonomy_*_save|delete()

Also taxonomy_get_tree() and taxonomy_check_vocabulary_hierarchy()

Proposed resolution

Replace usage of following functions with direct entity_() methods
taxonomy_term_(save|delete|delete_multiple)
taxonomy_vocabulary_(save|delete|delete_multiple)

API changes

taxonomy_term_delete() entity_delete_multiple('taxonomy_term', array($tid))
taxonomy_term_delete_multiple() entity_delete_multiple('taxonomy_term', array())
taxonomy_term_save() $term->save()
taxonomy_vocabulary_delete() entity_delete_multiple('taxonomy_vocabulary', array($tid))
taxonomy_vocabulary_delete_multiple() entity_delete_multiple('taxonomy_vocabulary', array())
taxonomy_vocabulary_save() $vocabulary->save()

taxonomy_check_vocabulary_hierarchy() #1976298: Convert taxonomy_get_tree() and associated functions into a Taxonomy service, retain procedural wrappers.
taxonomy_get_tree() #1980966: Refactor taxonomy_get_tree() to properly work with EntityNG


Viewing all articles
Browse latest Browse all 294274

Trending Articles