ParamSpec::at(1), 'style' => ParamSpec::at(2)]; } public function collect(Call $call, Resolver $resolver): void { $resolver->loader(QaLoader::class)->request((string) $call->param('id')); } /** * @return array */ public function props(Call $call, RenderContext $ctx): array { $id = (string) $call->param('id'); $props = ['id' => $id, 'title' => '']; $qa = $ctx->loader(QaLoader::class)->result($id); if ($qa !== null) { $props['title'] = (string) $qa->title; $props['resType'] = $qa->res_type; } return $props; } public function text(Call $call, RenderContext $ctx): string { return (string) $this->props($call, $ctx)['title']; } }