MultiWordController
extends VocabularyBaseController
in package
Controller for multi-word expression management.
Handles:
- /word/edit-multi - Create/edit multi-word expressions
- /word/delete-multi - Delete multi-word expressions
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.
- $dictionaryAdapter : DictionaryAdapter
- Adapters.
- $facade : VocabularyFacade
- Vocabulary facade.
- $languageFacade : LanguageFacade
- Services.
Methods
- __construct() : mixed
- Constructor.
- deleteMultiWordView() : void
- Delete multi-word expression (iframe view).
- editMulti() : void
- Edit multi-word expression.
- setViewPath() : void
- Set custom view path.
- 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.
- displayEditMultiWordForm() : void
- Display form for editing existing multi-word.
- displayMultiWordForm() : void
- Display multi-word edit form (new or existing).
- displayNewMultiWordForm() : void
- Display form for new multi-word.
- handleMultiWordOperation() : void
- Handle multi-word save/update operation.
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
$dictionaryAdapter
Adapters.
private
DictionaryAdapter
$dictionaryAdapter
$facade
Vocabulary facade.
private
VocabularyFacade
$facade
$languageFacade
Services.
private
LanguageFacade
$languageFacade
Methods
__construct()
Constructor.
public
__construct([VocabularyFacade|null $facade = null ][, DictionaryAdapter|null $dictionaryAdapter = null ][, LanguageFacade|null $languageFacade = null ]) : mixed
Parameters
- $facade : VocabularyFacade|null = null
-
Vocabulary facade
- $dictionaryAdapter : DictionaryAdapter|null = null
-
Dictionary adapter
- $languageFacade : LanguageFacade|null = null
-
Language facade
deleteMultiWordView()
Delete multi-word expression (iframe view).
public
deleteMultiWordView(array<string, string> $params) : void
Replaces delete_mword.php - deletes a multi-word and renders confirmation.
Parameters
- $params : array<string, string>
-
Route parameters
editMulti()
Edit multi-word expression.
public
editMulti(array<string, string> $params) : void
Parameters
- $params : array<string, string>
-
Route parameters
setViewPath()
Set custom view path.
public
setViewPath(string $path) : void
Parameters
- $path : string
-
View path
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
displayEditMultiWordForm()
Display form for editing existing multi-word.
private
displayEditMultiWordForm(int $wid, array{text: string, lgid: int, translation: string, sentence: string, notes: string, romanization: string, status: int} $wordData, int $tid, int $ord) : void
Parameters
- $wid : int
-
Word ID
- $wordData : array{text: string, lgid: int, translation: string, sentence: string, notes: string, romanization: string, status: int}
-
Word data from service
- $tid : int
-
Text ID
- $ord : int
-
Text order
displayMultiWordForm()
Display multi-word edit form (new or existing).
private
displayMultiWordForm() : void
displayNewMultiWordForm()
Display form for new multi-word.
private
displayNewMultiWordForm(string $text, int $tid, int $ord, int $len) : void
Parameters
- $text : string
-
Original text
- $tid : int
-
Text ID
- $ord : int
-
Text order
- $len : int
-
Number of words
handleMultiWordOperation()
Handle multi-word save/update operation.
private
handleMultiWordOperation() : void