How to list all vocabularies in drupal8 ?

Public

</> CopyGet raw version
php
  1. $vocabularies = taxonomy_vocabulary_get_names();
  2. print_r($vocabularies);
  3. // Output.
  4. /*
  5. Array
  6. (
  7.   [article_library] => article_library
  8.   [article_type] => article_type
  9.   [country] => country
  10.   [digital_marketing_area] => digital_marketing_area
  11.   [state_province] => state_province
  12. )
  13. */