Loading shs.module +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Database\Database; use Drupal\taxonomy\TermInterface; /** * List all javascript classes used to create models and views in the widget. Loading Loading @@ -114,6 +115,9 @@ function shs_term_has_children(int $tid): bool { /** @var \Drupal\taxonomy\TermInterface $term */ $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($tid); if (!($term instanceof TermInterface)) { return FALSE; } $access_unpublished = $current_user->hasPermission('administer taxonomy') || $current_user->hasPermission('view unpublished terms in ' . $term->bundle()); $query = Database::getConnection()->select('taxonomy_term_field_data', 't'); Loading Loading
shs.module +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Database\Database; use Drupal\taxonomy\TermInterface; /** * List all javascript classes used to create models and views in the widget. Loading Loading @@ -114,6 +115,9 @@ function shs_term_has_children(int $tid): bool { /** @var \Drupal\taxonomy\TermInterface $term */ $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($tid); if (!($term instanceof TermInterface)) { return FALSE; } $access_unpublished = $current_user->hasPermission('administer taxonomy') || $current_user->hasPermission('view unpublished terms in ' . $term->bundle()); $query = Database::getConnection()->select('taxonomy_term_field_data', 't'); Loading