ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Calendar\Shared\Inbox\TableBuilder Class Reference
+ Inheritance diagram for ILIAS\Calendar\Shared\Inbox\TableBuilder:
+ Collaboration diagram for ILIAS\Calendar\Shared\Inbox\TableBuilder:

Public Member Functions

 __construct (protected DataRetrieval $data_retrieval, protected ilLanguage $lng, protected UIFactory $ui_factory, protected HTTP $http, protected ilObjUser $user, protected DataFactory $data_factory)
 
 get (URLBuilder $url_builder, URLBuilderToken $id_token, URLBuilderToken $action_token)
 
 get (URLBuilder $url_builder, URLBuilderToken $id_token, URLBuilderToken $action_token)
 

Data Fields

const string NAME_COLUMN = 'name'
 
const string OWNER_COLUMN = 'owner'
 
const string APPOINTMENTS_COUNT_COLUMN = 'appointments_count'
 
const string CREATED_ON_COLUMN = 'created_on'
 
const string ACCEPT_INVITATION_ACTION = 'acceptShared'
 
const string DECLINE_INVITATION_ACTION = 'declineShared'
 

Detailed Description

Definition at line 34 of file TableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Calendar\Shared\Inbox\TableBuilder::__construct ( protected DataRetrieval  $data_retrieval,
protected ilLanguage  $lng,
protected UIFactory  $ui_factory,
protected HTTP  $http,
protected ilObjUser  $user,
protected DataFactory  $data_factory 
)

Definition at line 43 of file TableBuilder.php.

50 {
51 }

Member Function Documentation

◆ get()

ILIAS\Calendar\Shared\Inbox\TableBuilder::get ( URLBuilder  $url_builder,
URLBuilderToken  $id_token,
URLBuilderToken  $action_token 
)

Implements ILIAS\Calendar\Shared\TableBuilderInterface.

Definition at line 53 of file TableBuilder.php.

57 : DataTable {
58 $date_format = $this->user->getDateFormat();
59 if ($this->user->getTimeFormat() == ilCalendarSettings::TIME_FORMAT_24) {
60 $date_format = $this->data_factory->dateFormat()->withTime24($date_format);
61 } else {
62 $date_format = $this->data_factory->dateFormat()->withTime12($date_format);
63 }
64
65 $columns = [];
66 $columns[self::NAME_COLUMN] = $this->ui_factory->table()->column()->text(
67 $this->lng->txt('name')
68 )->withIsSortable(true);
69 $columns[self::OWNER_COLUMN] = $this->ui_factory->table()->column()->text(
70 $this->lng->txt('owner')
71 )->withIsSortable(true);
72 $columns[self::APPOINTMENTS_COUNT_COLUMN] = $this->ui_factory->table()->column()->number(
73 $this->lng->txt('cal_apps')
74 )->withIsSortable(true);
75 $columns[self::CREATED_ON_COLUMN] = $this->ui_factory->table()->column()->date(
76 $this->lng->txt('create_date'),
77 $date_format
78 )->withIsSortable(true);
79
80 $actions = [];
81 $actions[self::ACCEPT_INVITATION_ACTION] = $this->ui_factory->table()->action()->standard(
82 $this->lng->txt('cal_share_accept'),
83 $url_builder->withParameter($action_token, self::ACCEPT_INVITATION_ACTION),
84 $id_token
85 );
86 $actions[self::DECLINE_INVITATION_ACTION] = $this->ui_factory->table()->action()->standard(
87 $this->lng->txt('cal_share_decline'),
88 $url_builder->withParameter($action_token, self::DECLINE_INVITATION_ACTION),
89 $id_token
90 );
91
92 return $this->ui_factory->table()->data(
93 $this->data_retrieval,
94 $this->lng->txt('cal_shared_calendars'),
95 $columns
96 )->withActions($actions)->withRequest($this->http->request());
97 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\Calendar\Shared\Inbox\TableBuilder\ACCEPT_INVITATION_ACTION, ILIAS\Calendar\Shared\Inbox\TableBuilder\APPOINTMENTS_COUNT_COLUMN, ILIAS\Calendar\Shared\Inbox\TableBuilder\CREATED_ON_COLUMN, ILIAS\Calendar\Shared\Inbox\TableBuilder\DECLINE_INVITATION_ACTION, ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Calendar\Shared\Inbox\TableBuilder\NAME_COLUMN, ILIAS\Calendar\Shared\Inbox\TableBuilder\OWNER_COLUMN, ilCalendarSettings\TIME_FORMAT_24, ILIAS\Repository\user(), and ILIAS\UI\URLBuilder\withParameter().

+ Here is the call graph for this function:

Field Documentation

◆ ACCEPT_INVITATION_ACTION

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::ACCEPT_INVITATION_ACTION = 'acceptShared'

Definition at line 40 of file TableBuilder.php.

Referenced by ILIAS\Calendar\Shared\Inbox\TableBuilder\get().

◆ APPOINTMENTS_COUNT_COLUMN

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::APPOINTMENTS_COUNT_COLUMN = 'appointments_count'

◆ CREATED_ON_COLUMN

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::CREATED_ON_COLUMN = 'created_on'

◆ DECLINE_INVITATION_ACTION

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::DECLINE_INVITATION_ACTION = 'declineShared'

Definition at line 41 of file TableBuilder.php.

Referenced by ILIAS\Calendar\Shared\Inbox\TableBuilder\get().

◆ NAME_COLUMN

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::NAME_COLUMN = 'name'

◆ OWNER_COLUMN

const string ILIAS\Calendar\Shared\Inbox\TableBuilder::OWNER_COLUMN = 'owner'

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