You are here

public function ContentEntityCdfNormalizer::getBaseRoot in Acquia Content Hub 8

Return the global base_root variable that is defined by Drupal.

We set this to a function so it can be overridden in a PHPUnit test.

Return value

string Return global base_root variable.

1 call to ContentEntityCdfNormalizer::getBaseRoot()
ContentEntityCdfNormalizer::normalize in src/Normalizer/ContentEntityCdfNormalizer.php
Normalizes an object into a set of arrays/scalars.

File

src/Normalizer/ContentEntityCdfNormalizer.php, line 207

Class

ContentEntityCdfNormalizer
Converts the Drupal entity object to a Acquia Content Hub CDF array.

Namespace

Drupal\acquia_contenthub\Normalizer

Code

public function getBaseRoot() {
  if (isset($GLOBALS['base_root'])) {
    return $GLOBALS['base_root'];
  }
  return '';
}