ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Helper.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\UI\Factory as UIFactory;
25use ilLanguage;
29
30class Helper
31{
32 public function __construct(
33 protected ilCtrlInterface $ctrl,
34 protected ilLanguage $lng,
35 protected UIFactory $ui_factory
36 ) {
37 }
38
40 {
41 return $this->ui_factory->messageBox()->failure(
42 $error . '<br/>' . $this->lng->txt('search_server_further_information')
43 )->withLinks([$this->buildDeliverFileLink()]);
44 }
45
47 {
48 return $this->ui_factory->messageBox()->info(
49 $this->lng->txt('search_server_further_information')
50 )->withLinks([$this->buildDeliverFileLink()]);
51 }
52
53 protected function buildDeliverFileLink(): Link
54 {
55 $view_url = $this->ctrl->getLinkTargetByClass(
56 ilObjSearchSettingsReadmeGUI::class,
57 'deliverFile'
58 );
59 return $this->ui_factory->link()->standard(
60 $this->lng->txt('search_readme_file'),
61 $view_url
62 )->withOpenInNewViewport(true);
63 }
64}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
__construct(protected ilCtrlInterface $ctrl, protected ilLanguage $lng, protected UIFactory $ui_factory)
Definition: Helper.php:32
getServerErrorMessageBox(string $error)
Definition: Helper.php:39
ilErrorHandling $error
Definition: class.ilias.php:69
language handling
withLinks(array $links)
Get a Message Box like this, but with links.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31