You are here

public function Agreement::agreeOnce in Agreement 3.0.x

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

Agreement frequency setting.

Return value

bool TRUE if the agreement is configured for users to agree only once.

File

src/Entity/Agreement.php, line 68

Class

Agreement
Describes an agreement configuration.

Namespace

Drupal\agreement\Entity

Code

public function agreeOnce() {
  $settings = $this
    ->getSettings();
  return $settings['frequency'] == -1 ? TRUE : FALSE;
}