protected function TermDevelGenerate::deleteVocabularyTerms in Devel 8
Same name and namespace in other branches
- 8.3 devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::deleteVocabularyTerms()
- 8.2 devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::deleteVocabularyTerms()
- 4.x devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::deleteVocabularyTerms()
Deletes all terms of given vocabularies.
Parameters
array $vids: Array of vocabulary vid.
1 call to TermDevelGenerate::deleteVocabularyTerms()
- TermDevelGenerate::generateElements in devel_generate/
src/ Plugin/ DevelGenerate/ TermDevelGenerate.php - Business logic relating with each DevelGenerate plugin
File
- devel_generate/
src/ Plugin/ DevelGenerate/ TermDevelGenerate.php, line 140
Class
- TermDevelGenerate
- Provides a TermDevelGenerate plugin.
Namespace
Drupal\devel_generate\Plugin\DevelGenerateCode
protected function deleteVocabularyTerms($vids) {
$tids = $this->vocabularyStorage
->getToplevelTids($vids);
$terms = $this->termStorage
->loadMultiple($tids);
$this->termStorage
->delete($terms);
}