public function SiteAuditReportBase::weightKeySort in Site Audit 8.3
Sort by weight.
File
- src/
Plugin/ SiteAuditReportBase.php, line 185
Class
- SiteAuditReportBase
- Base class for Site Audit Report plugins.
Namespace
Drupal\site_audit\PluginCode
public function weightKeySort($a, $b) {
if ($a['weight'] > $b['weight']) {
return 1;
}
elseif ($a['weight'] < $b['weight']) {
return -1;
}
// They have the same weight, sort by id.
return strcmp($a['id'], $b['id']);
}