interface UserRestrictionTypeInterface in User restrictions 8
Defines the interface for UserRestrictionType plugins.
Hierarchy
- interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\user_restrictions\Plugin\UserRestrictionTypeInterface
Expanded class hierarchy of UserRestrictionTypeInterface
All classes that implement UserRestrictionTypeInterface
1 file declares its use of UserRestrictionTypeInterface
- UserRestrictionTypeBase.php in src/
Plugin/ UserRestrictionType/ UserRestrictionTypeBase.php
File
- src/
Plugin/ UserRestrictionTypeInterface.php, line 10
Namespace
Drupal\user_restrictions\PluginView source
interface UserRestrictionTypeInterface extends ContainerFactoryPluginInterface {
/**
* Check if the given data matches the restriction.
*
* @param array $data
* Data to check.
*
* @return bool
* TRUE if the value matches one of the restrictions, FALSE otherwise.
*/
public function matches(array $data);
/**
* Get the list of regular expression patterns of the type.
*
* @return string[]
* Array with regular expression patterns.
*/
public function getPatterns();
/**
* Get the plugin label.
*
* @return string
* The plugin label.
*/
public function getLabel();
/**
* Get error message displayed to the user.
*
* @return string
* Error message.
*/
public function getErrorMessage();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
UserRestrictionTypeInterface:: |
public | function | Get error message displayed to the user. | 1 |
UserRestrictionTypeInterface:: |
public | function | Get the plugin label. | 1 |
UserRestrictionTypeInterface:: |
public | function | Get the list of regular expression patterns of the type. | 1 |
UserRestrictionTypeInterface:: |
public | function | Check if the given data matches the restriction. | 3 |