ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Test\Logging\TestAdministrationInteraction Class Reference
+ Inheritance diagram for ILIAS\Test\Logging\TestAdministrationInteraction:
+ Collaboration diagram for ILIAS\Test\Logging\TestAdministrationInteraction:

Public Member Functions

 __construct (private readonly int $test_ref_id, private readonly int $admin_id, private readonly TestAdministrationInteractionTypes $interaction_type, private readonly int $modification_timestamp, private readonly array $additional_data)
 
 getUniqueIdentifier ()
 
 withId (int $id)
 
 getLogEntryAsDataTableRow (\ilLanguage $lng, TitleColumnsBuilder $title_builder, DataRowBuilder $row_builder, array $environment)
 
 getLogEntryAsExportRow (\ilLanguage $lng, TitleColumnsBuilder $title_builder, AdditionalInformationGenerator $additional_info, array $environment)
 
 getParsedAdditionalInformation (AdditionalInformationGenerator $additional_info, UIFactory $ui_factory, array $environment)
 
 toStorage ()
 

Data Fields

const IDENTIFIER = 'tai'
 
- Data Fields inherited from ILIAS\Test\Logging\TestUserInteraction
const LANG_VAR_PREFIX = 'logs_'
 

Private Attributes

int $id
 

Detailed Description

Definition at line 30 of file TestAdministrationInteraction.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Logging\TestAdministrationInteraction::__construct ( private readonly int  $test_ref_id,
private readonly int  $admin_id,
private readonly TestAdministrationInteractionTypes  $interaction_type,
private readonly int  $modification_timestamp,
private readonly array  $additional_data 
)
Parameters
array<stringlabel_lang_var => mixed value> $additional_data

Definition at line 39 of file TestAdministrationInteraction.php.

45  {
46 
47  }

Member Function Documentation

◆ getLogEntryAsDataTableRow()

ILIAS\Test\Logging\TestAdministrationInteraction::getLogEntryAsDataTableRow ( \ilLanguage  $lng,
TitleColumnsBuilder  $title_builder,
DataRowBuilder  $row_builder,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 61 of file TestAdministrationInteraction.php.

References ILIAS\Test\Logging\LogTable\ACTION_ID_SHOW_ADDITIONAL_INFO, ILIAS\UI\Component\Table\DataRowBuilder\buildDataRow(), ILIAS\Test\Utilities\TitleColumnsBuilder\buildTestTitleAsLink(), ilUserUtil\getNamePresentation(), ILIAS\Test\Logging\TestAdministrationInteraction\getUniqueIdentifier(), and ilLanguage\txt().

66  : DataRow {
67  return $row_builder->buildDataRow(
68  $this->getUniqueIdentifier(),
69  [
70  'date_and_time' => \DateTimeImmutable::createFromFormat('U', (string) $this->modification_timestamp)
71  ->setTimezone($environment['timezone']),
72  'corresponding_test' => $title_builder->buildTestTitleAsLink(
73  $this->test_ref_id
74  ),
76  $this->admin_id,
77  false,
78  false,
79  '',
80  true
81  ),
82  'log_entry_type' => $lng->txt(self::LANG_VAR_PREFIX . self::IDENTIFIER),
83  'interaction_type' => $lng->txt(self::LANG_VAR_PREFIX . $this->interaction_type->value)
84  ]
85  )->withDisabledAction(
87  $this->additional_data === []
88  );
89  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ getLogEntryAsExportRow()

ILIAS\Test\Logging\TestAdministrationInteraction::getLogEntryAsExportRow ( \ilLanguage  $lng,
TitleColumnsBuilder  $title_builder,
AdditionalInformationGenerator  $additional_info,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 91 of file TestAdministrationInteraction.php.

References ILIAS\Test\Utilities\TitleColumnsBuilder\buildTestTitleAsText(), ilUserUtil\getNamePresentation(), ILIAS\Test\Logging\AdditionalInformationGenerator\parseForExport(), and ilLanguage\txt().

96  : array {
97  return [
98  \DateTimeImmutable::createFromFormat('U', (string) $this->modification_timestamp)
99  ->setTimezone($environment['timezone'])
100  ->format($environment['date_format']),
101  $title_builder->buildTestTitleAsText($this->test_ref_id),
103  $this->admin_id,
104  false,
105  false,
106  '',
107  true
108  ),
109  '',
110  '',
111  '',
112  $lng->txt(self::LANG_VAR_PREFIX . self::IDENTIFIER),
113  $lng->txt(self::LANG_VAR_PREFIX . $this->interaction_type->value),
114  $additional_info->parseForExport($this->additional_data, $environment)
115  ];
116  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ getParsedAdditionalInformation()

ILIAS\Test\Logging\TestAdministrationInteraction::getParsedAdditionalInformation ( AdditionalInformationGenerator  $additional_info,
UIFactory  $ui_factory,
array  $environment 
)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 118 of file TestAdministrationInteraction.php.

References ILIAS\Test\Logging\AdditionalInformationGenerator\parseForTable().

123  return $additional_info->parseForTable($this->additional_data, $environment);
124  }
+ Here is the call graph for this function:

◆ getUniqueIdentifier()

ILIAS\Test\Logging\TestAdministrationInteraction::getUniqueIdentifier ( )

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 49 of file TestAdministrationInteraction.php.

References ILIAS\Test\Logging\TestAdministrationInteraction\$id.

Referenced by ILIAS\Test\Logging\TestAdministrationInteraction\getLogEntryAsDataTableRow().

49  : ?string
50  {
51  return self::IDENTIFIER . '_' . $this->id;
52  }
+ Here is the caller graph for this function:

◆ toStorage()

ILIAS\Test\Logging\TestAdministrationInteraction::toStorage ( )

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 126 of file TestAdministrationInteraction.php.

References ilDBConstants\T_CLOB, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

Referenced by ILIAS\Test\Logging\TestLoggingDatabaseRepository\storeTestAdministrationInteraction().

126  : array
127  {
128  return [
129  'ref_id' => [\ilDBConstants::T_INTEGER , $this->test_ref_id],
130  'admin_id' => [\ilDBConstants::T_INTEGER , $this->admin_id],
131  'interaction_type' => [\ilDBConstants::T_TEXT , $this->interaction_type->value],
132  'modification_ts' => [\ilDBConstants::T_INTEGER , $this->modification_timestamp],
133  'additional_data' => [\ilDBConstants::T_CLOB , json_encode($this->additional_data)]
134  ];
135  }
+ Here is the caller graph for this function:

◆ withId()

ILIAS\Test\Logging\TestAdministrationInteraction::withId ( int  $id)

Implements ILIAS\Test\Logging\TestUserInteraction.

Definition at line 54 of file TestAdministrationInteraction.php.

References ILIAS\Test\Logging\TestAdministrationInteraction\$id.

54  : self
55  {
56  $clone = clone $this;
57  $clone->id = $id;
58  return $clone;
59  }

Field Documentation

◆ $id

int ILIAS\Test\Logging\TestAdministrationInteraction::$id
private

◆ IDENTIFIER


The documentation for this class was generated from the following file: