public function TermStorage::updateParentHierarchy in Multiversion 8.2
Same name and namespace in other branches
- 8 src/Entity/Storage/Sql/TermStorage.php \Drupal\multiversion\Entity\Storage\Sql\TermStorage::updateParentHierarchy()
Updates terms hierarchy information for the children when terms are deleted.
Parameters
array $tids: Array of terms that need to be removed from hierarchy.
1 call to TermStorage::updateParentHierarchy()
- TermStorage::delete in src/
Entity/ Storage/ Sql/ TermStorage.php - Deletes permanently saved entities.
File
- src/
Entity/ Storage/ Sql/ TermStorage.php, line 34
Class
- TermStorage
- Storage handler for taxonomy terms.
Namespace
Drupal\multiversion\Entity\Storage\SqlCode
public function updateParentHierarchy($tids) {
$this->database
->update('taxonomy_term__parent')
->condition('parent_target_id', $tids, 'IN')
->fields([
'parent_target_id' => 0,
])
->execute();
}