Skip to content

Instantly share code, notes, and snippets.

View esod's full-sized avatar

Eric Sod esod

View GitHub Profile
@AllieRays
AllieRays / bar.php
Last active November 14, 2021 17:58
Programmatically create multiple taxonomy terms in Drupal 8
<?php
// Programmatically create taxonomy terms for taxonomy module on install.
// This is the bar.install file included in a module.
use Drupal\taxonomy\Entity\Term;
use Symfony\Component\Yaml\Yaml;
function foo_taxonomy_install() {
$vocabularies = [