19declare(strict_types=1);
45 }
catch (\SoapFault
$e) {
46 $this->
logger->error(
'SOAP auth connection test failed: ' . $e->getMessage());
47 $this->
logger->error($e->getTraceAsString());
50 $this->ui_factory->messageBox()->failure(
51 'SOAP Authentication Call Error: ' .
$e->getMessage()
56 $validation = $result->validation;
57 $is_valid = (bool) ($validation[
'valid'] ??
false);
59 ? $this->ui_factory->messageBox()->success(
'SOAP authentication succeeded.')
60 : $this->ui_factory->messageBox()->info(
'SOAP authentication returned invalid credentials.');
64 $this->ui_factory->listing()->descriptive([
65 'Valid' => $is_valid ?
'true' :
'false',
66 'First Name' => (
string) ($validation[
'firstname'] ??
''),
67 'Last Name' => (
string) ($validation[
'lastname'] ??
''),
68 'Email' => (
string) ($validation[
'email'] ??
''),
77 return $this->ui_factory->legacy()->content(
84 if (trim($xml) ===
'') {
85 return '(no XML captured)';
89 $escaped = htmlspecialchars($formatted, ENT_QUOTES);
90 $escaped = str_replace(
' ',
' ', $escaped);
92 return nl2br($escaped,
false);
97 if (trim($xml) ===
'') {
101 $dom = new \DOMDocument(
'1.0',
'UTF-8');
102 $dom->preserveWhiteSpace =
false;
103 $dom->formatOutput =
true;
105 if (@$dom->loadXML($xml) ===
false) {
106 return str_replace([
'>',
'" '], [
">\n",
"\"\n "], $xml);
109 return (
string) $dom->saveXML();
testConnection(string $ext_uid, string $soap_pw, bool $new_user)
__construct(private \ilSetting $settings, private Factory $ui_factory, private ilLogger $logger,)
prettyPrintXml(string $xml)
formatXmlForDisplay(string $xml)
renderXmlBlock(string $xml)
Builds a Color from either hex- or rgb values.
Component logger with individual log levels by component id.
A component is the most general form of an entity in the UI.
This is how the factory for UI elements looks.