You are here

class PasswordPolicyCondition in Password Policy 7.2

Class PasswordPolicyCondition.

This class is used for conditionally executing policies.

Hierarchy

Expanded class hierarchy of PasswordPolicyCondition

1 string reference to 'PasswordPolicyCondition'
password_policy_ctools_plugin_type in ./password_policy.module
Implements hook_ctools_plugin_type().

File

includes/PasswordPolicyCondition.inc, line 13
Contains PasswordPolicyCondition.

View source
class PasswordPolicyCondition extends PasswordPolicyItem {
  protected $ppType = array(
    'item',
    'condition',
  );

  /**
   * Checks whether condition matches.
   *
   * That is, check whether the condition is met for the given account.
   *
   * @param object $account
   *   User object.
   *
   * @return bool
   *   TRUE if the condition matches, FALSE otherwise.
   */
  public function match($account) {
    $func = $this
      ->func('condition callback');
    if ($func) {
      return $func($account, $this);
    }
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PasswordPolicyCondition::$ppType protected property Overrides PasswordPolicyItem::$ppType
PasswordPolicyCondition::match public function Checks whether condition matches.
PasswordPolicyItem::$config public property
PasswordPolicyItem::$info public property
PasswordPolicyItem::$policy public property
PasswordPolicyItem::adminForm public function Form constructor for adminForm().
PasswordPolicyItem::adminFormSubmit public function Form submission handler for adminForm().
PasswordPolicyItem::factory public static function Creates item.
PasswordPolicyItem::func protected function Gets function of item by name.
PasswordPolicyItem::isActive public function Determines whether item is active.
PasswordPolicyItem::isType public function Checks whether item is of a given type.
PasswordPolicyItem::__construct public function Constructs a PasswordPolicyItem object. 1