You are here

public function BackgroundImage::getSetting in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getSetting()
  2. 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getSetting()

Parameters

string $name: The name of the setting to retrieve.

mixed $default: The default value to use if the setting doesn't exist.

Return value

mixed The value for the the setting or $default if the setting doesn't exist.

Overrides BackgroundImageInterface::getSetting

7 calls to BackgroundImage::getSetting()
BackgroundImage::getBlur in src/Entity/BackgroundImage.php
BackgroundImage::getBlurRadius in src/Entity/BackgroundImage.php
BackgroundImage::getBlurSpeed in src/Entity/BackgroundImage.php
BackgroundImage::getImageHash in src/Entity/BackgroundImage.php
Retrieves the image based hash.
BackgroundImage::getSettingsHash in src/Entity/BackgroundImage.php
Retrieves the settings hash.

... See full list

File

src/Entity/BackgroundImage.php, line 413

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

public function getSetting($name, $default = NULL) {
  $value = $this
    ->getSettings()
    ->get($name);
  return isset($value) ? $value : $default;
}