You are here

public function PasswordPolicy::getConstraint in Password Policy 8.3

Return a specific constraint from the policy.

Return value

\Drupal\password_policy\PasswordConstraintInterface A specific constraint in the policy.

File

src/Entity/PasswordPolicy.php, line 117

Class

PasswordPolicy
Defines a Password Policy configuration entity class.

Namespace

Drupal\password_policy\Entity

Code

public function getConstraint($key) {
  if (!isset($this->policy_constraints[$key])) {
    return NULL;
  }
  return $this->policy_constraints[$key];
}