You are here

public function BackgroundImageSettings::getOriginal in Background Image 8

Same name and namespace in other branches
  1. 2.x src/BackgroundImageSettings.php \Drupal\background_image\BackgroundImageSettings::getOriginal()
  2. 2.0.x src/BackgroundImageSettings.php \Drupal\background_image\BackgroundImageSettings::getOriginal()
1 call to BackgroundImageSettings::getOriginal()
BackgroundImageSettings::set in src/BackgroundImageSettings.php
Sets a value in this configuration object.

File

src/BackgroundImageSettings.php, line 60

Class

BackgroundImageSettings

Namespace

Drupal\background_image

Code

public function getOriginal($key = '') {
  if (empty($key)) {
    return $this->originalData;
  }
  else {
    $parts = explode('.', $key);
    if (count($parts) == 1) {
      return isset($this->originalData[$key]) ? $this->originalData[$key] : NULL;
    }
    else {
      $value = NestedArray::getValue($this->originalData, $parts, $key_exists);
      return $key_exists ? $value : NULL;
    }
  }
}