You are here

interface UserRestrictionInterface in User restrictions 8

Defines the interface for UserRestriction entities.

Hierarchy

Expanded class hierarchy of UserRestrictionInterface

All classes that implement UserRestrictionInterface

File

src/Entity/UserRestrictionInterface.php, line 8

Namespace

Drupal\user_restrictions\Entity
View source
interface UserRestrictionInterface {

  /**
   * Get timestamp of rule expiration.
   *
   * @return int
   *   Timestamp of rule expiration.
   */
  public function getExpiry();

  /**
   * Get the pattern of the rule.
   *
   * @return string
   *   Regular expression (or exact string) to match against a value.
   */
  public function getPattern();

  /**
   * Get the type of restriction.
   *
   * @return int
   *   Either UserRestrictions::BLACKLIST or UserRestrictions::WHITELIST.
   */
  public function getAccessType();

  /**
   * Get the ID of the restrictions rule type.
   *
   * @see \Drupal\user_restrictions\Plugin\UserRestrictionTypeInterface
   *
   * @return string
   *   ID of restriction type.
   */
  public function getRuleType();

}

Members

Namesort descending Modifiers Type Description Overrides
UserRestrictionInterface::getAccessType public function Get the type of restriction. 1
UserRestrictionInterface::getExpiry public function Get timestamp of rule expiration. 1
UserRestrictionInterface::getPattern public function Get the pattern of the rule. 1
UserRestrictionInterface::getRuleType public function Get the ID of the restrictions rule type. 1