ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 getHTML ()
 
- 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 ()
 
 checkOffset (int $offset)
 
 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="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 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 ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. 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...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 

Protected Attributes

array $consultation_hour_links
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Container Block StandardGUIRequest $request
 
ILIAS Container 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
 

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 30 of file class.ilConsultationHoursCalendarBlockGUI.php.

31 {
33
34 $this->lng->loadLanguageModule("dateplaner");
35
36 $this->setBlockId('ch_' . $this->ctrl->getContextObjId());
37 $this->setLimit(5);
38 $this->setEnableNumInfo(false);
39 $this->setTitle($this->lng->txt('consultation_hours_block_title'));
40 $this->setPresentation(self::PRES_SEC_LIST);
41 }
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 43 of file class.ilConsultationHoursCalendarBlockGUI.php.

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

◆ getData()

ilConsultationHoursCalendarBlockGUI::getData ( )

Reimplemented from ilBlockGUI.

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

75 : array
76 {
77 if (isset($this->consultation_hour_links)) {
79 }
81 (int) $this->requested_ref_id,
82 $this->user->getId(),
83 $this->getTargetGUIClassPath()
84 );
85 }
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 getHTML().

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

◆ getHTML()

ilConsultationHoursCalendarBlockGUI::getHTML ( )

Reimplemented from ilBlockGUI.

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

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

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 87 of file class.ilConsultationHoursCalendarBlockGUI.php.

87 : Item
88 {
89 $button = $this->ui->factory()->button()->shy(
90 $data['txt'] ?? '',
91 $data['link'] ?? ''
92 );
93 return $this->ui->factory()->item()->standard($button);
94 }
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 56 of file class.ilConsultationHoursCalendarBlockGUI.php.

56 : array
57 {
58 $target_class = [];
59 if (!$this->getRepositoryMode()) {
60 $target_class = ["ildashboardgui", "ilcalendarpresentationgui"];
61 } else {
62 switch (ilObject::_lookupType((int) $this->requested_ref_id, true)) {
63 case "crs":
64 $target_class = ["ilobjcoursegui", "ilcalendarpresentationgui"];
65 break;
66
67 case "grp":
68 $target_class = ["ilobjgroupgui", "ilcalendarpresentationgui"];
69 break;
70 }
71 }
72 return $target_class;
73 }
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 48 of file class.ilConsultationHoursCalendarBlockGUI.php.

48 : bool
49 {
50 return false;
51 }

Field Documentation

◆ $consultation_hour_links

array ilConsultationHoursCalendarBlockGUI::$consultation_hour_links
protected

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

Referenced by getData().


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