Issue #1831540 followup by orb: Rewrite examples in taxonomy.api.php and remove references to synonyms.
parent
097303e4bf
commit
025aa2a110
|
@ -83,11 +83,9 @@ function hook_taxonomy_vocabulary_insert(Drupal\taxonomy\Plugin\Core\Entity\Voca
|
||||||
* A taxonomy vocabulary entity.
|
* A taxonomy vocabulary entity.
|
||||||
*/
|
*/
|
||||||
function hook_taxonomy_vocabulary_update(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
|
function hook_taxonomy_vocabulary_update(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
|
||||||
db_insert('mytable')
|
db_update('mytable')
|
||||||
->fields(array(
|
->fields(array('foo' => $vocabulary->foo))
|
||||||
'vid' => $vocabulary->id(),
|
->condition('vid', $vocabulary->id())
|
||||||
'foo' => $vocabulary->foo,
|
|
||||||
))
|
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,11 +204,9 @@ function hook_taxonomy_term_insert(Drupal\taxonomy\Term $term) {
|
||||||
* A taxonomy term entity.
|
* A taxonomy term entity.
|
||||||
*/
|
*/
|
||||||
function hook_taxonomy_term_update(Drupal\taxonomy\Term $term) {
|
function hook_taxonomy_term_update(Drupal\taxonomy\Term $term) {
|
||||||
db_insert('mytable')
|
db_update('mytable')
|
||||||
->fields(array(
|
->fields(array('foo' => $term->foo))
|
||||||
'tid' => $term->id(),
|
->condition('tid', $term->id())
|
||||||
'foo' => $term->foo,
|
|
||||||
))
|
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue