Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator Class Reference

Validator for checking that the combination of an entity's label and description are unique (per language). More...

+ Inheritance diagram for Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator:
+ Collaboration diagram for Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator:

Public Member Functions

 __construct (LabelDescriptionDuplicateDetector $duplicateDetector)
 
 validateEntity (EntityDocument $entity)
 
 validateFingerprint (TermList $labels, TermList $descriptions, EntityId $entityId, array $languageCodes=null)
 

Private Attributes

 $duplicateDetector
 

Detailed Description

Validator for checking that the combination of an entity's label and description are unique (per language).

This is used to make sure that no two items have the same label and description.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator::__construct ( LabelDescriptionDuplicateDetector  $duplicateDetector)

Member Function Documentation

◆ validateEntity()

Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator::validateEntity ( EntityDocument  $entity)
See also
EntityValidator::validate()
Parameters
EntityDocument$entity
Returns
Result PhanUndeclaredMethod Phan is confused by intersection types

Implements Wikibase\Repo\Validators\EntityValidator.

◆ validateFingerprint()

Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator::validateFingerprint ( TermList  $labels,
TermList  $descriptions,
EntityId  $entityId,
array  $languageCodes = null 
)
See also
FingerprintValidator::validateFingerprint()
Parameters
TermList$labels
TermList$descriptions
EntityId$entityId
string[] | null$languageCodes
Returns
Result

Implements Wikibase\Repo\Validators\FingerprintValidator.

Member Data Documentation

◆ $duplicateDetector

Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator::$duplicateDetector
private

The documentation for this class was generated from the following file: