ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilLanguageDuplicateIdentifierException Class Reference

Thrown by ilObjLanguageExt::importLanguageFile() before anything is written, when entries would duplicate an identifier of another module or in another spelling (rule 2 of docs/development/language.md). More...

+ Inheritance diagram for ilLanguageDuplicateIdentifierException:
+ Collaboration diagram for ilLanguageDuplicateIdentifierException:

Public Member Functions

 __construct (private readonly array $duplicates)
 
 getDuplicates ()
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 A code isn't optional as in build in class Exception. More...
 

Detailed Description

Thrown by ilObjLanguageExt::importLanguageFile() before anything is written, when entries would duplicate an identifier of another module or in another spelling (rule 2 of docs/development/language.md).

Definition at line 25 of file class.ilLanguageDuplicateIdentifierException.php.

Constructor & Destructor Documentation

◆ __construct()

ilLanguageDuplicateIdentifierException::__construct ( private readonly array  $duplicates)
Parameters
array<string,list<string>>$duplicates key => "<module>: <identifier>" it would duplicate, see \ILIAS\Language\ComponentTranslation\IdentifierUniqueness::findDuplicatesAmong()

Definition at line 31 of file class.ilLanguageDuplicateIdentifierException.php.

32 {
33 parent::__construct(sprintf(
34 'Identifiers that already exist in another module or in another spelling: %s',
35 implode(', ', array_keys($duplicates))
36 ));
37 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $duplicates, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDuplicates()

ilLanguageDuplicateIdentifierException::getDuplicates ( )
Returns
array<string, list<string>>

Definition at line 42 of file class.ilLanguageDuplicateIdentifierException.php.

42 : array
43 {
44 return $this->duplicates;
45 }

References $duplicates.


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