You are here

public function Agreement::getSettings in Agreement 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/Agreement.php \Drupal\agreement\Entity\Agreement::getSettings()

Returns the settings as an array.

Return value

array The stored settings or some sane defaults.

5 calls to Agreement::getSettings()
Agreement::accountHasAgreementRole in src/Entity/Agreement.php
Find if the agreement applies to an user account by role.
Agreement::agreeOnce in src/Entity/Agreement.php
Agreement frequency setting.
Agreement::getAgreementFrequencyTimestamp in src/Entity/Agreement.php
Agreement frequency timestamp.
Agreement::getVisibilityPages in src/Entity/Agreement.php
Get a formatted visibility pages as a string.
Agreement::getVisibilitySetting in src/Entity/Agreement.php
Get the visibility setting.

File

src/Entity/Agreement.php, line 95

Class

Agreement
Describes an agreement configuration.

Namespace

Drupal\agreement\Entity

Code

public function getSettings() {
  $defaults = $this
    ->getDefaultSettings();
  $settings = $this
    ->get('settings');
  if ($settings === NULL) {
    $settings = [];
  }
  return NestedArray::mergeDeep($defaults, $settings);
}