You are here

public function YoastSeoManager::setScoreToStatusRulesConfiguration in Real-time SEO for Drupal 8

Set configuration for score to status rules.

Parameters

array $elt: The element on which to attach the configuration.

Return value

array The same element passed, with the new configuration attached.

File

src/YoastSeoManager.php, line 252

Class

YoastSeoManager
Class YoastSeoManager.

Namespace

Drupal\yoast_seo

Code

public function setScoreToStatusRulesConfiguration(&$elt) {
  $score_to_status_rules = $this
    ->getScoreToStatusRules();

  // Score statuses.
  $elt['#attached']['drupalSettings']['yoast_seo']['score_status'] = $score_to_status_rules;
  return $elt;
}