public function SeoManager::getScoreRules in Real-time SEO for Drupal 8.2
Retrieves the score rules from configuration.
Return value
string[] A list of labels indexed by the minimum score required. Ordered from high to low.
1 call to SeoManager::getScoreRules()
- SeoManager::getScoreStatus in src/
SeoManager.php - Get the status for a given score.
File
- src/
SeoManager.php, line 153
Class
- SeoManager
- Utility service for the Real-Time SEO module.
Namespace
Drupal\yoast_seoCode
public function getScoreRules() {
$rules = \Drupal::config('yoast_seo.settings')
->get('score_rules');
// Ensure rules are sorted from high to low score.
ksort($rules);
return array_reverse($rules, TRUE);
}