public function VocabularyListBuilder::load in Taxonomy access fix 8
Same name and namespace in other branches
- 8.3 src/VocabularyListBuilder.php \Drupal\taxonomy_access_fix\VocabularyListBuilder::load()
- 8.2 src/VocabularyListBuilder.php \Drupal\taxonomy_access_fix\VocabularyListBuilder::load()
Override Drupal\Core\Config\Entity\ConfigEntityListBuilder::load().
Overrides ConfigEntityListBuilder::load
File
- src/
VocabularyListBuilder.php, line 14
Class
Namespace
Drupal\taxonomy_access_fixCode
public function load() {
$entities = parent::load();
// Remove vocabularies the current user doesn't have any access for.
foreach ($entities as $id => $entity) {
if (!taxonomy_access_fix_access('list terms', $entity)) {
unset($entities[$id]);
}
}
return $entities;
}