ILIAS  release_8 Revision v8.24
ilConsultationHoursCalendarBlockGUI Class Reference

@ilCtrl_IsCalledBy ilConsultationHoursCalendarBlockGUI: ilColumnGUI More...

+ Inheritance diagram for ilConsultationHoursCalendarBlockGUI:
+ Collaboration diagram for ilConsultationHoursCalendarBlockGUI:

Public Member Functions

 __construct ()
 
 getBlockType ()
 
 getTargetGUIClassPath ()
 Get target gui class path (for presenting the calendar) More...
 
 getData ()
 
 getHTMLNew ()
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 correctOffset ()
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="")
 
 getBlockCommands ()
 
 getHTML ()
 
 fillHeaderCommands ()
 
 fillHeaderTitleBlock ()
 
 setDataSection (string $a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used. More...
 
 fillDataSection ()
 Standard implementation for row based data. More...
 
 fillRow (array $a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 
 setPreviousNextLinks ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getHTMLNew ()
 
 getNoItemFoundContent ()
 

Protected Member Functions

 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 fillRowColor (string $a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getViewControls ()
 Get view controls. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 send (string $output)
 Send. More...
 

Protected Attributes

bool $new_rendering = true
 
array $consultation_hour_links
 
- Protected Attributes inherited from ilBlockGUI
object $gui_object
 
ILIAS Block StandardGUIRequest $request
 
ILIAS Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 
bool $new_rendering = false
 

Additional Inherited Members

- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 
- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilConsultationHoursCalendarBlockGUI::__construct ( )

Reimplemented from ilBlockGUI.

Definition at line 31 of file class.ilConsultationHoursCalendarBlockGUI.php.

32 {
34
35 $this->lng->loadLanguageModule("dateplaner");
36
37 $this->setBlockId('ch_' . $this->ctrl->getContextObjId());
38 $this->setLimit(5);
39 $this->setEnableNumInfo(false);
40 $this->setTitle($this->lng->txt('consultation_hours_block_title'));
41 $this->setPresentation(self::PRES_SEC_LIST);
42 }
setTitle(string $a_title)
setPresentation(int $type)
setBlockId(string $a_block_id="0")
setLimit(int $a_limit)
setEnableNumInfo(bool $a_enablenuminfo)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setLimit(), ilBlockGUI\setPresentation(), and ilBlockGUI\setTitle().

+ Here is the call graph for this function:

Member Function Documentation

◆ getBlockType()

ilConsultationHoursCalendarBlockGUI::getBlockType ( )

Reimplemented from ilBlockGUI.

Definition at line 44 of file class.ilConsultationHoursCalendarBlockGUI.php.

44 : string
45 {
46 return 'chcal';
47 }

◆ getData()

ilConsultationHoursCalendarBlockGUI::getData ( )

Reimplemented from ilBlockGUI.

Definition at line 76 of file class.ilConsultationHoursCalendarBlockGUI.php.

76 : array
77 {
78 if (isset($this->consultation_hour_links)) {
80 }
82 (int) $this->requested_ref_id,
83 $this->user->getId(),
84 $this->getTargetGUIClassPath()
85 );
86 }
static getConsultationHourLinksForRepositoryObject(int $ref_id, int $current_user_id, array $ctrl_class_structure)

References $consultation_hour_links, ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), and ILIAS\Repository\user().

Referenced by getHTMLNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTMLNew()

ilConsultationHoursCalendarBlockGUI::getHTMLNew ( )

Reimplemented from ilBlockGUI.

Definition at line 97 of file class.ilConsultationHoursCalendarBlockGUI.php.

97 : string
98 {
99 if (empty($this->getData())) {
100 return '';
101 }
102 return parent::getHTMLNew();
103 }

References getData().

+ Here is the call graph for this function:

◆ getListItemForData()

ilConsultationHoursCalendarBlockGUI::getListItemForData ( array  $data)
protected

Get list item for data array.

Parameters
array$data
Returns
null|\ILIAS\UI\Component\Item\Item

Reimplemented from ilBlockGUI.

Definition at line 88 of file class.ilConsultationHoursCalendarBlockGUI.php.

88 : Item
89 {
90 $button = $this->ui->factory()->button()->shy(
91 $data['txt'] ?? '',
92 $data['link'] ?? ''
93 );
94 return $this->ui->factory()->item()->standard($button);
95 }
Common interface to all items.
Definition: Item.php:32

References ilBlockGUI\$data, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getTargetGUIClassPath()

ilConsultationHoursCalendarBlockGUI::getTargetGUIClassPath ( )

Get target gui class path (for presenting the calendar)

Definition at line 57 of file class.ilConsultationHoursCalendarBlockGUI.php.

57 : array
58 {
59 $target_class = [];
60 if (!$this->getRepositoryMode()) {
61 $target_class = ["ildashboardgui", "ilcalendarpresentationgui"];
62 } else {
63 switch (ilObject::_lookupType((int) $this->requested_ref_id, true)) {
64 case "crs":
65 $target_class = ["ilobjcoursegui", "ilcalendarpresentationgui"];
66 break;
67
68 case "grp":
69 $target_class = ["ilobjgroupgui", "ilcalendarpresentationgui"];
70 break;
71 }
72 }
73 return $target_class;
74 }
static _lookupType(int $id, bool $reference=false)

References ilObject\_lookupType(), and ilBlockGUI\getRepositoryMode().

+ Here is the call graph for this function:

◆ isRepositoryObject()

ilConsultationHoursCalendarBlockGUI::isRepositoryObject ( )
protected

Returns whether block has a corresponding repository object.

Reimplemented from ilBlockGUI.

Definition at line 49 of file class.ilConsultationHoursCalendarBlockGUI.php.

49 : bool
50 {
51 return false;
52 }

Field Documentation

◆ $consultation_hour_links

array ilConsultationHoursCalendarBlockGUI::$consultation_hour_links
protected

Definition at line 29 of file class.ilConsultationHoursCalendarBlockGUI.php.

Referenced by getData().

◆ $new_rendering

bool ilConsultationHoursCalendarBlockGUI::$new_rendering = true
protected

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