Drupal 8/9 programmatically Create a vocabulary and terms
Create a vocabulary generated by \Drupal\taxonomy\Entity\Vocabulary and create a vocabulary object by using the Vocabulary::create() function. The Drupal::entityManager has been removed in Drupal 9. x and should be replaced with Drupal::entityTypeManager. To create entities, use the create() method of the entity manager service.
Share
share your add link
https%3A%2F%2Fmycode.blog%2Flakshmi%2Fdrupal-89-programmatically-create-vocabulary-terms%0A
Share in social
Comments