Taxonomy (分類)

1 篇文章 / 0 new
author
Taxonomy (分類)
vocabulary 主分類 taxonomy.module
taxonomy_vocabulary_load($vid)
taxonomy_vocabulary_machine_name_load($name)
taxonomy_vocabulary_load_multiple($vids = array(), $conditions = array())
taxonomy_get_vocabularies()
載入主分類資料
taxonomy_vocabulary_save($vocabulary) 儲存主分類資料
taxonomy_vocabulary_delete($vid) 刪除主分類資料含所屬的次分類資料
term 次分類  
taxonomy_term_load($tid)
taxonomy_term_load_multiple($tids = array(), $conditions = array())
taxonomy_get_term_by_name($name, $vocabulary = NULL)
載入次分類資料
taxonomy_term_save($term) 儲存次分類資料
taxonomy_term_delete($tid) 刪除次分類資料
taxonomy_get_parents($tid)
taxonomy_get_parents_all($tid)
取得父層資料
taxonomy_get_children($tid, $vid = 0) 取得子層資料
taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE) 取得指定主分類下所屬的次分類資料, 注意回傳的陣列是一維的次分類物件非tree結構型態,
taxonomy_select_nodes($tid, $pager = TRUE, $limit = FALSE,
 $order = array('t.sticky' => 'DESC', 't.created' => 'DESC'))
傳回該分類關聯的 node Id
hook  
hook_taxonomy_term_delete($term)
hook_taxonomy_term_insert($term)
hook_taxonomy_term_load($terms)
hook_taxonomy_term_presave($term)
hook_taxonomy_term_update($term)
hook_taxonomy_term_view($term, $view_mode, $langcode)
hook_taxonomy_term_view_alter(&$build)
 
hook_taxonomy_vocabulary_delete($vocabulary)
hook_taxonomy_vocabulary_insert($vocabulary)
hook_taxonomy_vocabulary_load($vocabularies)
hook_taxonomy_vocabulary_presave($vocabulary)
hook_taxonomy_vocabulary_update($vocabulary)
 
主要資料表
Free Web Hosting