You are here

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

Constructor for YoastSeoManager.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler service.

File

src/YoastSeoManager.php, line 42

Class

YoastSeoManager
Class YoastSeoManager.

Namespace

Drupal\yoast_seo

Code

public function __construct(ModuleHandlerInterface $module_handler) {
  $this->moduleHandler = $module_handler;
  $this->yoast_seo_field_manager = \Drupal::service('yoast_seo.field_manager');

  // Populate js target ids.
  foreach (self::$jsTargets as $js_target_name => $js_target_id) {
    if (!preg_match('/^js/', $js_target_id)) {
      self::$jsTargets[$js_target_name] = Html::getUniqueId($js_target_id);
    }
  }
}