TermStatusController
extends VocabularyBaseController
in package
Controller for term status operations.
Handles:
- PUT /vocabulary/term/{wid}/status - Update status
- /word/set-status - Set status (iframe view)
- /word/set-review-status - Set review status (iframe view)
- /word/insert-wellknown - Insert as well-known
- /word/insert-ignore - Insert as ignored
- /word/set-all-status - Mark all words with status
Tags
Table of Contents
Properties
- $bulkService : WordBulkService|null
- $contextService : WordContextService|null
- $crudService : WordCrudService|null
- Lazy-loaded services.
- $discoveryService : WordDiscoveryService|null
- $expressionService : ExpressionService|null
- $linkingService : WordLinkingService|null
- $multiWordService : MultiWordService|null
- $sentenceService : SentenceService|null
- $textStatisticsService : TextStatisticsService|null
- $uploadService : WordUploadService|null
- $viewPath : string
- View base path.
- $createTermFromHover : CreateTermFromHover
- Create term from hover use case.
- $facade : VocabularyFacade
- Vocabulary facade.
Methods
- __construct() : mixed
- Constructor.
- insertIgnore() : void
- Insert word as ignored (iframe view).
- insertWellknown() : void
- Insert word as well-known (iframe view).
- markAllWords() : void
- Mark all words with status (well-known or ignore).
- setReviewStatusView() : void
- Set review status (iframe view).
- setViewPath() : void
- Set custom view path.
- setWordStatusView() : void
- Set word status (iframe view).
- updateStatus() : void
- Update term status.
- getBulkService() : WordBulkService
- Get WordBulkService (lazy loaded).
- getContextService() : WordContextService
- Get WordContextService (lazy loaded).
- getCrudService() : WordCrudService
- Get WordCrudService (lazy loaded).
- getDiscoveryService() : WordDiscoveryService
- Get WordDiscoveryService (lazy loaded).
- getExpressionService() : ExpressionService
- Get ExpressionService (lazy loaded).
- getLinkingService() : WordLinkingService
- Get WordLinkingService (lazy loaded).
- getMultiWordService() : MultiWordService
- Get MultiWordService (lazy loaded).
- getSentenceService() : SentenceService
- Get SentenceService (lazy loaded).
- getTextStatisticsService() : TextStatisticsService
- Get TextStatisticsService (lazy loaded).
- getUploadService() : WordUploadService
- Get WordUploadService (lazy loaded).
- render() : void
- Render a view.
- createFromHover() : array<string|int, mixed>
- Create a term from hover action in reading view.
- insertWordWithStatus() : void
- Insert word with specified status.
Properties
$bulkService
protected
WordBulkService|null
$bulkService
= null
$contextService
protected
WordContextService|null
$contextService
= null
$crudService
Lazy-loaded services.
protected
WordCrudService|null
$crudService
= null
$discoveryService
protected
WordDiscoveryService|null
$discoveryService
= null
$expressionService
protected
ExpressionService|null
$expressionService
= null
$linkingService
protected
WordLinkingService|null
$linkingService
= null
$multiWordService
protected
MultiWordService|null
$multiWordService
= null
$sentenceService
protected
SentenceService|null
$sentenceService
= null
$textStatisticsService
protected
TextStatisticsService|null
$textStatisticsService
= null
$uploadService
protected
WordUploadService|null
$uploadService
= null
$viewPath
View base path.
protected
string
$viewPath
$createTermFromHover
Create term from hover use case.
private
CreateTermFromHover
$createTermFromHover
$facade
Vocabulary facade.
private
VocabularyFacade
$facade
Methods
__construct()
Constructor.
public
__construct([VocabularyFacade|null $facade = null ][, CreateTermFromHover|null $createTermFromHover = null ]) : mixed
Parameters
- $facade : VocabularyFacade|null = null
-
Vocabulary facade
- $createTermFromHover : CreateTermFromHover|null = null
-
Create term from hover use case
insertIgnore()
Insert word as ignored (iframe view).
public
insertIgnore(array<string, string> $params) : void
Replaces insert_word_ignore.php - creates term with status 98.
Parameters
- $params : array<string, string>
-
Route parameters
insertWellknown()
Insert word as well-known (iframe view).
public
insertWellknown(array<string, string> $params) : void
Replaces insert_word_wellknown.php - creates term with status 99.
Parameters
- $params : array<string, string>
-
Route parameters
markAllWords()
Mark all words with status (well-known or ignore).
public
markAllWords(array<string, string> $params) : void
Parameters
- $params : array<string, string>
-
Route parameters
Tags
setReviewStatusView()
Set review status (iframe view).
public
setReviewStatusView(array<string, string> $params) : void
Replaces set_test_status.php - sets status during review and renders result.
Parameters
- $params : array<string, string>
-
Route parameters
setViewPath()
Set custom view path.
public
setViewPath(string $path) : void
Parameters
- $path : string
-
View path
setWordStatusView()
Set word status (iframe view).
public
setWordStatusView(array<string, string> $params) : void
Replaces set_word_status.php - sets status and renders result in iframe.
Parameters
- $params : array<string, string>
-
Route parameters
updateStatus()
Update term status.
public
updateStatus([int|null $wid = null ]) : void
Routes:
- PUT /vocabulary/term/{wid:int}/status (new RESTful route)
- PUT /vocabulary/term/status?wid=[id] (legacy route)
Body: {"status": 1-5|98|99}
Parameters
- $wid : int|null = null
-
Term ID (injected from route parameter)
getBulkService()
Get WordBulkService (lazy loaded).
protected
getBulkService() : WordBulkService
Return values
WordBulkServicegetContextService()
Get WordContextService (lazy loaded).
protected
getContextService() : WordContextService
Return values
WordContextServicegetCrudService()
Get WordCrudService (lazy loaded).
protected
getCrudService() : WordCrudService
Return values
WordCrudServicegetDiscoveryService()
Get WordDiscoveryService (lazy loaded).
protected
getDiscoveryService() : WordDiscoveryService
Return values
WordDiscoveryServicegetExpressionService()
Get ExpressionService (lazy loaded).
protected
getExpressionService() : ExpressionService
Return values
ExpressionServicegetLinkingService()
Get WordLinkingService (lazy loaded).
protected
getLinkingService() : WordLinkingService
Return values
WordLinkingServicegetMultiWordService()
Get MultiWordService (lazy loaded).
protected
getMultiWordService() : MultiWordService
Return values
MultiWordServicegetSentenceService()
Get SentenceService (lazy loaded).
protected
getSentenceService() : SentenceService
Return values
SentenceServicegetTextStatisticsService()
Get TextStatisticsService (lazy loaded).
protected
getTextStatisticsService() : TextStatisticsService
Return values
TextStatisticsServicegetUploadService()
Get WordUploadService (lazy loaded).
protected
getUploadService() : WordUploadService
Return values
WordUploadServicerender()
Render a view.
protected
render(string $view[, array<string|int, mixed> $data = [] ]) : void
Parameters
- $view : string
-
View name (without .php)
- $data : array<string|int, mixed> = []
-
View data
createFromHover()
Create a term from hover action in reading view.
private
createFromHover(int $textId, string $wordText, int $status[, string $sourceLang = '' ][, string $targetLang = '' ]) : array<string|int, mixed>
Parameters
- $textId : int
-
Text ID
- $wordText : string
-
Word text
- $status : int
-
Word status (1-5)
- $sourceLang : string = ''
-
Source language code
- $targetLang : string = ''
-
Target language code
Return values
array<string|int, mixed> —Term creation result
insertWordWithStatus()
Insert word with specified status.
private
insertWordWithStatus(array<string, string> $params, int $status) : void
Common logic for insertWellknown and insertIgnore.
Parameters
- $params : array<string, string>
-
Route parameters
- $status : int
-
Status to set (98 or 99)