2include_once 
'./Services/Calendar/interfaces/interface.ilCalendarAppointmentPresentation.php';
 
    3include_once 
'./Services/Calendar/classes/class.ilCalendarViewGUI.php';
 
   98    public function __construct($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
  101        $this->appointment = $a_appointment;
 
  102        $this->infoscreen = $a_info_screen;
 
  103        $this->toolbar = $a_toolbar;
 
  104        $this->lng = 
$DIC->language();
 
  105        $this->lng->loadLanguageModule(
"dateplaner");
 
  106        $this->tree = 
$DIC->repositoryTree();
 
  107        $this->ui = 
$DIC->ui();
 
  108        $this->list_item = $a_list_item;
 
  109        $this->ctrl = 
$DIC->ctrl();
 
  110        $this->access = 
$DIC->access();
 
  111        $this->rbacsystem = 
$DIC->rbac()->system();
 
  112        $this->
user = $DIC->user();
 
  130        $cat_id = $this->
getCatId($this->appointment[
'event']->getEntryId());
 
  132        $this->obj_id = $category->getObjId();
 
  140    public static function getInstance($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
  142        return new static($a_appointment, $a_info_screen, $a_toolbar, $a_list_item);
 
  182        $cat_id = $this->
getCatId($this->appointment[
'event']->getEntryId());
 
  190        $next_class = 
$ilCtrl->getNextClass();
 
  191        $cmd = 
$ilCtrl->getCmd(
"getHTML");
 
  193        switch ($next_class) {
 
  195                return $this->$cmd();
 
  210            foreach ($this->info_items as 
$i) {
 
  211                switch (
$i[
"type"]) {
 
  226            if ($settings->isBatchFileDownloadsEnabled() && $this->has_files) {
 
  228                $this->ctrl->setParameter($this, 
"app_id", $this->appointment[
'event']->getEntryId());
 
  229                $add_button = $this->ui->factory()->button()->standard(
 
  230                    $this->lng->txt(
"cal_download_files"),
 
  231                    $this->ctrl->getLinkTarget($this, 
"downloadFiles")
 
  233                $this->ctrl->setParameter($this, 
"app_id", 
$_GET[
"app_id"]);
 
  234                $toolbar->addComponent($add_button);
 
  238            foreach ($this->actions as $a) {
 
  240                $btn->setCaption($a[
"txt"], 
false);
 
  241                $btn->setUrl($a[
"link"]);
 
  254                $label = $dd->getLabel();
 
  258            foreach ($this->actions as $a) {
 
  259                $actions[] = 
$ui->factory()->button()->shy($a[
"txt"], $a[
"link"]);
 
  261            foreach ($this->list_properties as $lp) {
 
  262                $properties[$lp[
"txt"]] = $lp[
"val"];
 
  265            $new_dd =  
$ui->factory()->dropdown()->standard(
$actions)
 
  267            $this->list_item = 
$list_item->withActions($new_dd)->withProperties($properties);
 
  279        $ref_id = current($refs);
 
  280        if (count($refs) == 1 && $ref_id > 0) {
 
  282            $f = $this->ui->factory();
 
  283            $r = $this->ui->renderer();
 
  286            $cont_ref_id = 
$tree->checkForParentType($ref_id, 
'grp');
 
  287            if ($cont_ref_id == 0) {
 
  288                $cont_ref_id = 
$tree->checkForParentType($ref_id, 
'crs');
 
  291            if ($cont_ref_id > 0) {
 
  295                $this->
addInfoProperty($this->lng->txt(
"obj_" . 
$type), 
$r->render($f->button()->shy($parent_title, $href)));
 
  308        $this->info_items[] = array(
"type" => 
"section", 
"txt" => $a_txt);
 
  319        $this->info_items[] = array(
"type" => 
"property", 
"txt" => $a_txt, 
"val" => $a_val);
 
  331        $this->list_properties[] = array(
"txt" => $a_txt, 
"val" => $a_val);
 
  342        $this->actions[] = array(
"txt" => $a_txt, 
"link" => $a_link);
 
  361        if ($cat_info[
'editable'] and !$this->appointment[
'event']->isAutoGenerated()) {
 
  362            $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
 
  364            $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'app_id', $this->appointment[
'event']->getEntryId());
 
  365            $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'dt', $this->appointment[
'dstart']);
 
  368                $this->lng->txt(
"edit"),
 
  369                $this->ctrl->getLinkTargetByClass(array(
'ilcalendarappointmentgui'), 
'askEdit')
 
  372            $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
 
  374            $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'app_id', $this->appointment[
'event']->getEntryId());
 
  375            $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'dt', $this->appointment[
'dstart']);
 
  378                $this->lng->txt(
"delete"),
 
  379                $this->ctrl->getLinkTargetByClass(array(
'ilcalendarappointmentgui'), 
'askDelete')
 
  395        foreach ($refs as $ref_id) {
 
  397            if (count($refs) > 1) {
 
  398                $par_ref = $this->tree->getParentId($ref_id);
 
  401            $buttons[] = $this->ui->renderer()->render(
 
  408            $prop_value = implode(
"<br>", $buttons);
 
  410        if ($prop_value != 
'') {
 
  424        if (!isset($this->readable_ref_ids[$a_obj_id])) {
 
  427                if ($this->access->checkAccess(
"read", 
"", $ref_id)) {
 
  428                    $ref_ids[] = $ref_id;
 
  431            $this->readable_ref_ids[$a_obj_id] = $ref_ids;
 
  433        return $this->readable_ref_ids[$a_obj_id];
 
  455        if ($a_app[
'event']->getLocation()) {
 
  456            $this->
addInfoProperty($this->lng->txt(
"cal_where"), $a_app[
'event']->getLocation());
 
  479        $this->ctrl->setParameterByClass(
"ilCalendarPresentationGUI", 
"category_id", $cat_info[
"cat_id"]);
 
  481        $link = $this->ui->renderer()->render(
 
  482            $this->ui->factory()->button()->shy(
 
  484                $this->ctrl->getLinkTargetByClass(array(
"ilPersonalDesktopGUI", 
"ilCalendarPresentationGUI"), 
"")
 
  488        $this->ctrl->setParameterByClass(
"ilCalendarPresentationGUI", 
"category_id", 
$_GET[
"category_id"]);
 
  500    public function addCommonSection($a_app, $a_obj_id = 0, $cat_info = 
null, $a_container_info = 
false)
 
  503        $this->
addInfoSection($a_app[
"event"]->getPresentationTitle(
false));
 
  514        if ($a_container_info) {
 
  522        if ($cat_info != 
null) {
 
  530    public function addMetaData($a_obj_type, $a_obj_id, $a_sub_obj_type = 
null, $a_sub_obj_id = 
null)
 
  533        include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  535        $md_items = $record_gui->parse();
 
  536        if (count($md_items)) {
 
  537            foreach ($md_items as $md_item) {
 
  553        $ctrl_path = array();
 
  554        if (
$type == 
"crs") {
 
  555            $ctrl_path[] = 
"ilobjcoursegui";
 
  557        if (
$type == 
"grp") {
 
  558            $ctrl_path[] = 
"ilobjgroupgui";
 
  560        if (strtolower(
$_GET[
"baseClass"]) == 
"ilpersonaldesktopgui") {
 
  561            $ctrl_path[] = 
"ilpersonaldesktopgui";
 
  563        $ctrl_path[] = 
"ilCalendarPresentationGUI";
 
  564        $ctrl_path[] = 
"ilpublicuserprofilegui";
 
  570            $this->ctrl->getParentReturn($this),
 
  588            $entry_id = (int) 
$_GET[
'app_id'];
 
  591            if ($entry->getStart()) {
 
  594                    "dstart" => $entry->getStart(),
 
  595                    "dend"      => $entry->getEnd(),
 
  596                    "fullday" => $entry->isFullday()
 
  600                $this->ctrl->returnToParent($this);
 
  604        include_once 
'./Services/Calendar/classes/BackgroundTasks/class.ilDownloadFilesBackgroundTask.php';
 
  607        $download_job->setBucketTitle($this->lng->txt(
"cal_calendar_download") . 
" " . 
$appointment[
'event']->getTitle());
 
  609        if ($download_job->run()) {
 
  612        $this->ctrl->returnToParent($this);
 
An exception for terminatinating execution or to throw for unit testing.
const MODE_APP_PRESENTATION
addObjectLinks($obj_id)
Add object link.
addCalendarInfo($cat_info)
Add calendar info.
addLastUpdate($a_app)
Add last update.
readObjIdForAppointment()
read obj_id for appointment
addMetaData($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
Add metadata.
__construct($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
getListItem()
Get list item.
addContainerInfo($a_obj_id)
Add course/group container info.
addEventDescription($a_app)
Add event description.
downloadFiles()
Download files from an appointment ( Modals )
addListItemProperty($a_txt, $a_val)
Add list item property.
collectStandardPropertiesAndActions()
Collect standard properties and actions.
getReadableRefIds($a_obj_id)
Get readable ref ids.
getUserName($a_user_id, $a_force_name=false)
Get (linked if possible) user name.
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
addAction($a_txt, $a_link)
Add action.
collectPropertiesAndActions()
Collect properties and actions.
static getInstance($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
addInfoProperty($a_txt, $a_val)
Add info property.
addEventLocation($a_app)
Add event location.
addInfoSection($a_txt)
Add info section.
static _getInstance($a_usr_id=0)
get singleton instance
static _lookupCategory($a_cal_id)
Lookup category id.
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.
Model for a calendar entry.
static _getInstance()
get singleton instance
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
Description of class class.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen