ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilConsultationHoursCalendarBlockGUI Class Reference

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 ()
 
 getListItemForData (array $data)
 
- 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 ( )

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

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

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  }
setLimit(int $a_limit)
setBlockId(string $a_block_id="0")
setEnableNumInfo(bool $a_enablenuminfo)
__construct(Container $dic, ilPlugin $plugin)
setTitle(string $a_title)
setPresentation(int $type)
+ Here is the call graph for this function:

Member Function Documentation

◆ getBlockType()

ilConsultationHoursCalendarBlockGUI::getBlockType ( )

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

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

◆ getData()

ilConsultationHoursCalendarBlockGUI::getData ( )

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

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

Referenced by getHTMLNew().

76  : array
77  {
78  if (isset($this->consultation_hour_links)) {
80  }
81  return $this->consultation_hour_links = \ilConsultationHourUtils::getConsultationHourLinksForRepositoryObject(
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)
getTargetGUIClassPath()
Get target gui class path (for presenting the calendar)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTMLNew()

ilConsultationHoursCalendarBlockGUI::getHTMLNew ( )

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

References getData().

97  : string
98  {
99  if (empty($this->getData())) {
100  return '';
101  }
102  return parent::getHTMLNew();
103  }
+ Here is the call graph for this function:

◆ getListItemForData()

ilConsultationHoursCalendarBlockGUI::getListItemForData ( array  $data)
protected

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

References ILIAS\Repository\ui().

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:31
+ 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.

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

Referenced by getData().

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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

ilConsultationHoursCalendarBlockGUI::isRepositoryObject ( )
protected

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: