GlossaryApi
extends AbstractApi
in package
Glossaries help to explain some specific terms or the ones often used in the project so that they can be properly and consistently translated.
Use API to manage glossaries or specific terms. Glossary export and import are asynchronous operations and shall be completed with sequence of API methods.
Table of Contents
Methods
- clearTerms() : mixed
- Clear Glossary
- create() : Glossary|null
- Add Glossary
- createTerm() : mixed
- Add Term
- delete() : mixed
- Delete Glossary
- deleteTerm() : mixed
- Delete Term
- download() : DownloadFile|null
- Download Glossary
- export() : GlossaryExport|null
- Export Glossary
- get() : Glossary|null
- Get Glossary
- getExport() : GlossaryExport|null
- Check Glossary Export Status
- getImport() : GlossaryImport|null
- Check Glossary Import Status
- getTerm() : Term|null
- Get Term Info
- import() : GlossaryImport|null
- Import Glossary
- list() : ModelCollection
- List Glossaries
- listTerms() : ModelCollection|null
- List Terms
- update() : Glossary|null
- Edit Glossary Info
- updateTerm() : Term|null
- Edit Term
Methods
clearTerms()
Clear Glossary
public
clearTerms(int $glossaryId) : mixed
Parameters
- $glossaryId : int
Tags
create()
Add Glossary
public
create(array<string|int, mixed> $params) : Glossary|null
Parameters
- $params : array<string|int, mixed>
-
string $params[name] required
integer $params[groupId]
Tags
Return values
Glossary|nullcreateTerm()
Add Term
public
createTerm(int $glossaryId, array<string|int, mixed> $data) : mixed
Parameters
- $glossaryId : int
- $data : array<string|int, mixed>
-
string $data[languageId] required
string $data[text] required
string $data[description]
string $data[partOfSpeech]
integer $data[translationOfTermId]
Tags
delete()
Delete Glossary
public
delete(int $glossaryId) : mixed
Parameters
- $glossaryId : int
Tags
deleteTerm()
Delete Term
public
deleteTerm(int $glossaryId, int $termId) : mixed
Parameters
- $glossaryId : int
- $termId : int
Tags
download()
Download Glossary
public
download(int $glossaryId, string $exportId) : DownloadFile|null
Parameters
- $glossaryId : int
- $exportId : string
Tags
Return values
DownloadFile|nullexport()
Export Glossary
public
export(int $glossaryId[, string $format = 'tbx' ][, array<string|int, mixed> $exportFields = ['term', 'description', 'partOfSpeech'] ]) : GlossaryExport|null
Parameters
- $glossaryId : int
- $format : string = 'tbx'
- $exportFields : array<string|int, mixed> = ['term', 'description', 'partOfSpeech']
Tags
Return values
GlossaryExport|nullget()
Get Glossary
public
get(int $glossaryId) : Glossary|null
Parameters
- $glossaryId : int
Tags
Return values
Glossary|nullgetExport()
Check Glossary Export Status
public
getExport(int $glossaryId, string $exportId) : GlossaryExport|null
Parameters
- $glossaryId : int
- $exportId : string
Tags
Return values
GlossaryExport|nullgetImport()
Check Glossary Import Status
public
getImport(int $glossaryId, string $importId) : GlossaryImport|null
Parameters
- $glossaryId : int
- $importId : string
Tags
Return values
GlossaryImport|nullgetTerm()
Get Term Info
public
getTerm(int $glossaryId, int $termId) : Term|null
Parameters
- $glossaryId : int
- $termId : int
Tags
Return values
Term|nullimport()
Import Glossary
public
import(int $glossaryId, array<string|int, mixed> $data) : GlossaryImport|null
Parameters
- $glossaryId : int
- $data : array<string|int, mixed>
-
integer $data[storageId] required
array $data[scheme]
boolean $data[firstLineContainsHeader]
Tags
Return values
GlossaryImport|nulllist()
List Glossaries
public
list([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
-
integer $params[groupId]
integer $params[limit]
integer $params[offset]
integer $params[userId]
Tags
Return values
ModelCollectionlistTerms()
List Terms
public
listTerms(int $glossaryId[, array<string|int, mixed> $params = [] ]) : ModelCollection|null
Parameters
- $glossaryId : int
- $params : array<string|int, mixed> = []
-
integer $params[userId]
string $params[languageId]
integer $params[translationOfTermId]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollection|nullupdate()
Edit Glossary Info
public
update(Glossary $glossary) : Glossary|null
Parameters
- $glossary : Glossary
Tags
Return values
Glossary|nullupdateTerm()
Edit Term
public
updateTerm(Term $term) : Term|null
Parameters
- $term : Term