Wikibase
MediaWiki Wikibase extension
|
Service interface for detecting label conflicts. More...
Public Member Functions | |
getLabelConflicts ( $entityType, array $labels, array $aliases=null) | |
Returns a list of Terms that conflict with (that is, match) the given labels. | |
getLabelWithDescriptionConflicts ( $entityType, array $labels, array $descriptions) | |
Returns a list of Terms that conflict with (that is, match) the given labels and descriptions. | |
Service interface for detecting label conflicts.
Wikibase\Lib\Store\LabelConflictFinder::getLabelConflicts | ( | $entityType, | |
array | $labels, | ||
array | $aliases = null ) |
Returns a list of Terms that conflict with (that is, match) the given labels.
Conflicts are defined to be inside on type of entity and language. If $aliases is not null (but possibly empty), conflicts between aliases and labels are also considered.
string | $entityType | The entity type to consider for conflicts. |
string[] | $labels | The labels to look for, with language codes as keys. |
array[] | null | $aliases | The aliases to look for, with language codes as keys. If null, conflicts with aliases are not considered. |
Wikibase\Lib\Store\LabelConflictFinder::getLabelWithDescriptionConflicts | ( | $entityType, | |
array | $labels, | ||
array | $descriptions ) |
Returns a list of Terms that conflict with (that is, match) the given labels and descriptions.
Conflicts are defined to be inside on type of entity and one language. For a label to be considered a conflict, there must be a conflicting description on the same entity. From this it follows that labels with no corresponding description cannot contribute to a conflicts.
string | null | $entityType | The relevant entity type |
string[] | $labels | The labels to look for, with language codes as keys. |
string[] | $descriptions | The descriptions to consider (if desired), with language codes as keys. |