protected function UserExportPluginManager::sortDefinitions in Open Social 8.4
Same name and namespace in other branches
- 8.3 modules/social_features/social_user_export/src/Plugin/UserExportPluginManager.php \Drupal\social_user_export\Plugin\UserExportPluginManager::sortDefinitions()
- 8.5 modules/social_features/social_user_export/src/Plugin/UserExportPluginManager.php \Drupal\social_user_export\Plugin\UserExportPluginManager::sortDefinitions()
- 8.6 modules/social_features/social_user_export/src/Plugin/UserExportPluginManager.php \Drupal\social_user_export\Plugin\UserExportPluginManager::sortDefinitions()
- 8.7 modules/social_features/social_user_export/src/Plugin/UserExportPluginManager.php \Drupal\social_user_export\Plugin\UserExportPluginManager::sortDefinitions()
Order by weight.
Parameters
array $a: First parameter.
array $b: Second parameter.
Return value
int The weight to be used for the usort function.
File
- modules/
social_features/ social_user_export/ src/ Plugin/ UserExportPluginManager.php, line 55
Class
- UserExportPluginManager
- Provides the User export plugin plugin manager.
Namespace
Drupal\social_user_export\PluginCode
protected function sortDefinitions(array $a, array $b) {
if (isset($a['weight']) && isset($b['weight'])) {
return $a['weight'] < $b['weight'] ? -1 : 1;
}
return 0;
}