function taxonomy_vocabulary_sort

Sorts vocabularies by its weight and label.

Parameters

array $vocabularies: An array of \Drupal\taxonomy\Plugin\Core\Entity\Vocabulary objects.

2 calls to taxonomy_vocabulary_sort()
VocabularyTest::testTaxonomyAdminChangingWeights in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php
Changing weights on the vocabulary overview with two or more vocabularies.
VocabularyUnitTest::testTaxonomyVocabularyLoadMultiple in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUnitTest.php
Tests for loading multiple vocabularies.

File

drupal/core/modules/taxonomy/taxonomy.module, line 825
Enables the organization of content into categories.

Code

function taxonomy_vocabulary_sort(array &$vocabularies = array()) {

  // @todo Remove error suppressing when http://drupal.org/node/1799600 is
  // fixed.
  @uasort($vocabularies, 'Drupal\\Core\\Config\\Entity\\ConfigEntityBase::sort');
}