Documentation

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
since
3.0.0

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

Methods

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
psalm-suppress

UnresolvableInclude Path computed from viewPath property

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)

render()

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)


        
On this page

Search results