You are here

public function FormatterBase::getSetting in Blazy 7

File

src/Plugin/Field/FieldFormatter/FormatterBase.php, line 135

Class

FormatterBase
Base class for blazy/slick image, and file formatters.

Namespace

Drupal\blazy\Plugin\Field\FieldFormatter

Code

public function getSetting($key) {

  // Merge defaults if we have no value for the key.
  if (!$this->defaultSettingsMerged && !array_key_exists($key, $this->settings)) {
    $this
      ->mergeDefaults();
  }
  return isset($this->settings[$key]) ? $this->settings[$key] : NULL;
}