ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
Search.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\User\Search;
22
23use ILIAS\UI\Factory as UIFactory;
25
26class Search
27{
28 public function __construct(
29 private readonly UIFactory $ui_factory,
30 private readonly EndpointFactory $endpoint_factory
31 ) {
32 }
33
38 public function getInput(
39 string $label,
40 EndpointConfigurator $endpoint_configurator,
41 ?string $byline = null
42 ): Tag {
43 $endpoint = $this->getEndpointGUI($endpoint_configurator);
44
45 return $this->ui_factory->input()->field()->tag($label, [], $byline)
46 ->withSuggestionsStartAfter($endpoint->getSuggestionsStartAfter())
47 ->withAsyncAutocomplete(...$endpoint->acquireBuilderAndToken());
48 }
49
54 public function getEndpointGUI(
55 EndpointConfigurator $endpoint_configurator
56 ): EndpointGUI {
57 return $this->endpoint_factory->getEndpointGUI($endpoint_configurator);
58 }
59
74 array $parent_class_path
77 $parent_class_path
78 );
79 }
80}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
__construct(private readonly UIFactory $ui_factory, private readonly EndpointFactory $endpoint_factory)
Definition: Search.php:28
getDefaultEndpointConfigurator(array $parent_class_path)
Definition: Search.php:73
getEndpointGUI(EndpointConfigurator $endpoint_configurator)
Definition: Search.php:54
getInput(string $label, EndpointConfigurator $endpoint_configurator, ?string $byline=null)
Definition: Search.php:38
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...