You are here

protected function AddServices::getContent in TacJS 8.6

Same name and namespace in other branches
  1. 8.3 src/Form/Steps/AddServices.php \Drupal\tacjs\Form\Steps\AddServices::getContent()
  2. 8.4 src/Form/Steps/AddServices.php \Drupal\tacjs\Form\Steps\AddServices::getContent()
  3. 8.5 src/Form/Steps/AddServices.php \Drupal\tacjs\Form\Steps\AddServices::getContent()

Helper function for the tacjs.add_services form.

Default tarteaucitron.js services.

You can copy content directly from the following URL: https://opt-out.ferank.eu/json.php

Return value

array

1 call to AddServices::getContent()
AddServices::__construct in src/Form/Steps/AddServices.php
Constructs a new AddServices.

File

src/Form/Steps/AddServices.php, line 185

Class

AddServices
Class AddServices.

Namespace

Drupal\tacjs\Form\Steps

Code

protected function getContent() {

  // Get the module base path.
  $relative_path = dirname(__DIR__, 3);

  // Get the content.json file from the base path.
  $content_json_path = $relative_path . '/assets/data/content.json';

  // Load file content.
  $content_json = file_get_contents($content_json_path);
  return Json::decode($content_json);
}