ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 ->withoutStripTags();
49 }
50
55 public function getEndpointGUI(
56 EndpointConfigurator $endpoint_configurator
57 ): EndpointGUI {
58 return $this->endpoint_factory->getEndpointGUI($endpoint_configurator);
59 }
60
75 array $parent_class_path
78 $parent_class_path
79 );
80 }
81}
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:74
getEndpointGUI(EndpointConfigurator $endpoint_configurator)
Definition: Search.php:55
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...