Skip to content
Snippets Groups Projects
Commit 025aa2a1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1831540 followup by orb: Rewrite examples in taxonomy.api.php and...

Issue #1831540 followup by orb: Rewrite examples in taxonomy.api.php and remove references to synonyms.
parent 097303e4
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -83,11 +83,9 @@ function hook_taxonomy_vocabulary_insert(Drupal\taxonomy\Plugin\Core\Entity\Voca
* A taxonomy vocabulary entity.
*/
function hook_taxonomy_vocabulary_update(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
db_insert('mytable')
->fields(array(
'vid' => $vocabulary->id(),
'foo' => $vocabulary->foo,
))
db_update('mytable')
->fields(array('foo' => $vocabulary->foo))
->condition('vid', $vocabulary->id())
->execute();
}
......@@ -206,11 +204,9 @@ function hook_taxonomy_term_insert(Drupal\taxonomy\Term $term) {
* A taxonomy term entity.
*/
function hook_taxonomy_term_update(Drupal\taxonomy\Term $term) {
db_insert('mytable')
->fields(array(
'tid' => $term->id(),
'foo' => $term->foo,
))
db_update('mytable')
->fields(array('foo' => $term->foo))
->condition('tid', $term->id())
->execute();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment