You are here

public function EntityLegalDocument::getSetting in Entity Legal 7.2

Same name and namespace in other branches
  1. 7 entity_legal.entity.inc \EntityLegalDocument::getSetting()

Get a legal document setting.

Functions similar to variable get by allowing default values but differs by checking for a variable keys existence

Parameters

string $setting_group: The group of settings the setting belongs to.

string $setting_key: The settings key within the settings group.

mixed $default: The default value to return if the setting is not found.

Return value

mixed The value of hte setting.

1 call to EntityLegalDocument::getSetting()
EntityLegalDocument::getAcceptanceDeliveryMethod in ./entity_legal.entity.inc
Get the acceptance delivery method for a given user type.

File

./entity_legal.entity.inc, line 218
Entity API main classes used by entity_legal module.

Class

EntityLegalDocument
Legal Document entity with revision support.

Code

public function getSetting($setting_group, $setting_key, $default = FALSE) {
  if (!isset($this->settings)) {
    return $default;
  }
  if (!isset($this->settings[$setting_group])) {
    return $default;
  }
  if (!isset($this->settings[$setting_group][$setting_key])) {
    return $default;
  }
  return $this->settings[$setting_group][$setting_key];
}