class PurgeInvalidation in Purge 8.3
Defines a PurgeInvalidation annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\purge\Annotation\PurgeInvalidation
Expanded class hierarchy of PurgeInvalidation
8 classes are annotated with PurgeInvalidation
- DomainInvalidation in src/
Plugin/ Purge/ Invalidation/ DomainInvalidation.php - Describes an entire domain to be invalidated.
- EverythingInvalidation in src/
Plugin/ Purge/ Invalidation/ EverythingInvalidation.php - Describes that everything is to be invalidated.
- PathInvalidation in src/
Plugin/ Purge/ Invalidation/ PathInvalidation.php - Describes path based invalidation, e.g. "news/article-1".
- RegularExpressionInvalidation in src/
Plugin/ Purge/ Invalidation/ RegularExpressionInvalidation.php - Describes invalidation by regular expression, e.g.: '\.(jpg|jpeg|css|js)$'.
- TagInvalidation in src/
Plugin/ Purge/ Invalidation/ TagInvalidation.php - Describes invalidation by Drupal cache tag, e.g.: 'user:1', 'menu:footer'.
File
- src/
Annotation/ PurgeInvalidation.php, line 12
Namespace
Drupal\purge\AnnotationView source
class PurgeInvalidation extends Plugin {
/**
* The plugin ID of the invalidation type.
*
* @var string
*/
public $id;
/**
* The human-readable name of the invalidation type.
*
* @var \Drupal\Core\Annotation\Translation
* @ingroup plugin_translatable
*/
public $label;
/**
* The description of the invalidation type.
*
* @var \Drupal\Core\Annotation\Translation
* @ingroup plugin_translatable
*/
public $description;
/**
* Example expressions.
*
* Example expression strings that this type supports, shown to the user in
* user interfaces as usability hints. Leave empty for types that don't
* need expressions for instantiation, see $expression_required.
*
* @var string[]
*/
public $examples = [];
/**
* Required expression.
*
* Whether invalidation objects of this type require a string expression that
* describes what needs to be purged. If put to FALSE, the fact this type is
* instantiated is deemed enough information for purgers to execute it.
*
* @var bool
*/
public $expression_required = TRUE;
// phpcs:ignore -- annotation property!
/**
* Can expressions be empty.
*
* When expression_required = TRUE, this determines whether a string
* expression can be equal to "" (empty string). If FALSE, this invalidation
* type can not be instantiated with empty expression strings.
*
* @var bool
*/
public $expression_can_be_empty = FALSE;
// phpcs:ignore -- annotation property!
/**
* Expression must be a string.
*
* When expression got passed but when it is not a string, this will result in
* an error when its set to TRUE.
*
* @var bool
*/
public $expression_must_be_string = FALSE;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |
PurgeInvalidation:: |
public | property | The description of the invalidation type. | |
PurgeInvalidation:: |
public | property | Example expressions. | |
PurgeInvalidation:: |
public | property | Can expressions be empty. | |
PurgeInvalidation:: |
public | property | Expression must be a string. | |
PurgeInvalidation:: |
public | property | Required expression. | |
PurgeInvalidation:: |
public | property | The plugin ID of the invalidation type. | |
PurgeInvalidation:: |
public | property | The human-readable name of the invalidation type. |