ParamSpec::at(1)]; } public function collect(Call $call, Resolver $resolver): void { $lang = $resolver->channels()->get($call->scope->firstChannel())?->lang ?: $resolver->options->lang; $channel = $this->channelService->systemUid( '_System_Grammar_Term_'.strtolower((string) $lang).'_', '_System_Grammar_Term_en_', ); $call->data['term'] = $resolver->loader(TermLoader::class)->request( (string) $call->param('word'), '', $channel === false ? null : $channel, $call->scope, ); } /** * @return array */ public function props(Call $call, RenderContext $ctx): array { $word = (string) $call->param('word'); return ['word' => $word, 'term' => TermTemplate::termProps($ctx, $call->data['term'] ?? null, $word)]; } public function text(Call $call, RenderContext $ctx): string { return (string) $call->param('word'); } }