CodeCompletionController
Code completion for code editor
This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.
Attributes
- #[AsController]
Table of Contents
Methods
- __construct() : mixed
- loadCompletions() : ResponseInterface
- Loads all templates up to a given page id (walking the rootline) and cleans parts that are not required for the code editor code-completion.
- getLanguageService() : LanguageService
- getMergedTemplates() : array<string|int, mixed>
- Gets merged templates by walking the rootline to a given page id.
Methods
__construct()
public
__construct(SysTemplateRepository $sysTemplateRepository, SysTemplateTreeBuilder $treeBuilder, LossyTokenizer $lossyTokenizer, IncludeTreeTraverser $treeTraverser) : mixed
Parameters
- $sysTemplateRepository : SysTemplateRepository
- $treeBuilder : SysTemplateTreeBuilder
- $lossyTokenizer : LossyTokenizer
- $treeTraverser : IncludeTreeTraverser
loadCompletions()
Loads all templates up to a given page id (walking the rootline) and cleans parts that are not required for the code editor code-completion.
public
loadCompletions(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacegetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetMergedTemplates()
Gets merged templates by walking the rootline to a given page id.
protected
getMergedTemplates(int $pageId, ServerRequestInterface $request) : array<string|int, mixed>
This is loaded once via ajax when a code editor in typoscript mode is fired. JS then knows the object types and can auto-complete on CTRL+space.
Parameters
- $pageId : int
- $request : ServerRequestInterface
Return values
array<string|int, mixed> —Setup part of merged template records