You are here

public function BackgroundImageSettings::getOverridden in Background Image 2.0.x

Same name and namespace in other branches
  1. 8 src/BackgroundImageSettings.php \Drupal\background_image\BackgroundImageSettings::getOverridden()
  2. 2.x src/BackgroundImageSettings.php \Drupal\background_image\BackgroundImageSettings::getOverridden()
1 call to BackgroundImageSettings::getOverridden()
BackgroundImageSettings::isOverridden in src/BackgroundImageSettings.php

File

src/BackgroundImageSettings.php, line 76

Class

BackgroundImageSettings

Namespace

Drupal\background_image

Code

public function getOverridden($key = '') {

  // Whole overridden array.
  if (empty($key)) {
    return $this->overriddenData;
  }

  // Top level key.
  $parts = explode('.', $key);
  if (count($parts) == 1) {
    return isset($this->overriddenData[$key]) ? $this->overriddenData[$key] : NULL;
  }

  // Nested key.
  $value = NestedArray::getValue($this->overriddenData, $parts, $key_exists);
  return $key_exists ? $value : NULL;
}