20 declare(strict_types=1);
    44     public function __construct(
object $a_parent_obj, 
string $a_parent_cmd, 
int $a_crs_ref_id, array $a_members)
    48         $this->ui_factory = $DIC->ui()->factory();
    49         $this->renderer = $DIC->ui()->renderer();
    51         $this->tree = $DIC->repositoryTree();
    52         $this->
access = $DIC->access();
    54         $this->
setId(
'sessov');
    66         foreach ($this->events as $idx => $event_obj) {
    69             if (trim($event_obj->getTitle())) {
    70                 $tt[] = $event_obj->getTitle();
    72             if (trim($event_obj->getDescription())) {
    73                 $tt[] = $event_obj->getDescription();
    75             if (trim($event_obj->getLocation())) {
    76                 $tt[] = $this->
lng->txt(
"event_location") . 
': ' . $event_obj->getLocation();
    78             $tt[] = $this->
lng->txt(
"event_date_time") . 
': ' . $event_obj->getFirstAppointment()->appointmentToString();
    81             if (
sizeof($this->events) <= 4) {
    82                 $caption = $event_obj->getFirstAppointment()->appointmentToString();
    83                 if (
sizeof($tt) == 1) {
    91             $tt = implode(
"<br />\n", $tt);
    93             $this->
addColumn((
string) $caption, 
'event_' . $event_obj->getId(), 
'', 
false, 
'', $tt, 
true);
    99         $this->
setRowTemplate(
'tpl.sess_list_row.html', 
'Modules/Session');
   101         $this->
getItems($this->events, $a_members);
   110         foreach ($tree->getSubtree($tree->
getNodeData($a_crs_ref_id), 
false, [
'sess']) as $event_id) {
   112             if (!is_object($tmp_event) ||
   113                 !$ilAccess->checkAccess(
'manage_members', 
'', $event_id)) {
   117             $events[$tmp_event->getFirstAppointment()->getStartingTime() . 
'_' . $tmp_event->getId()] = $tmp_event;
   121         return array_values($events);
   124     protected function getItems(array $a_events, array $a_members): void
   127         foreach ($a_members as $user_id) {
   129             $data[$user_id] = array(
   130                 'name' => $name[
'lastname'] . 
', ' . $name[
'firstname'],
   131                 'login' => $name[
'login']
   134         foreach ($a_events as $event_obj) {
   136             foreach ($a_members as $user_id) {
   137                 if (array_key_exists($user_id, $users_of_event)) {
   138                     $data[$user_id][
'event_' . $event_obj->getId()] = 
true;
   140                     $data[$user_id][
'event_' . $event_obj->getId()] = 
false;
   147     protected function fillRow(array $a_set): void
   149         $this->tpl->setVariable(
'NAME', $a_set[
'name']);
   150         $this->tpl->setVariable(
'LOGIN', $a_set[
'login']);
   152         $this->tpl->setCurrentBlock(
'eventcols');
   153         foreach ($this->events as $event_obj) {
   154             if ($a_set[
'event_' . $event_obj->getId()]) {
   155                 $icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath(
'standard/icon_ok.svg'), $this->
lng->txt(
'event_participated'));
   157                 $icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath(
'standard/icon_not_ok.svg'), $this->
lng->txt(
'event_not_participated'));
   159             $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $this->renderer->render(
$icon));
   160             $this->tpl->parseCurrentBlock();
 
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node. 
 
gatherEvents(int $a_crs_ref_id)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
getItems(array $a_events, array $a_members)
 
static _getParticipated(int $a_event_id)
 
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
static _lookupName(int $a_user_id)
lookup user name 
 
Table presentation for session overview. 
 
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_crs_ref_id, array $a_members)
 
setDefaultOrderField(string $a_defaultorderfield)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id 
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)