ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPDPortfolioBlockGUI Class Reference

Portfolio block for PD. More...

+ Inheritance diagram for ilPDPortfolioBlockGUI:
+ Collaboration diagram for ilPDPortfolioBlockGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getHTML ()
 Execute command. More...
 
 fillDataSection ()
 Fill data section. More...
 
 fillRow ($p)
 get flat bookmark list for personal desktop More...
 
- Public Member Functions inherited from ilBlockGUI
 ilBlockGUI ()
 Constructor. More...
 
 addHeaderLink ($a_href, $a_text, $status=true)
 
 getHeaderLinks ()
 
 setData ($a_data)
 Set Data. More...
 
 getData ()
 Get Data. More...
 
 setBigMode ($a_bigmode)
 Set Big Mode. More...
 
 getBigMode ()
 Get Big Mode. More...
 
 setBlockId ($a_block_id=0)
 Set Block Id. More...
 
 getBlockId ()
 Get Block Id. More...
 
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels. More...
 
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level. More...
 
 setGuiObject (&$a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 Get GuiObject. More...
 
 getCurrentDetailLevel ()
 Get Current Detail Level. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setImage ($a_image)
 Set Image. More...
 
 getImage ()
 Get Image. More...
 
 setOffset ($a_offset)
 Set Offset. More...
 
 getOffset ()
 Get Offset. More...
 
 correctOffset ()
 
 setLimit ($a_limit)
 Set Limit. More...
 
 getLimit ()
 Get Limit. More...
 
 setEnableEdit ($a_enableedit)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode. More...
 
 getRepositoryMode ()
 Get RepositoryMode. More...
 
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info. More...
 
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info. More...
 
 setSubtitle ($a_subtitle)
 Set Subtitle. More...
 
 getSubtitle ()
 Get Subtitle. More...
 
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true). More...
 
 setAdminCommands ($a_admincommands)
 Set Administration Commmands. More...
 
 getAdminCommands ()
 Get Administration Commmands. More...
 
 setColSpan ($a_colspan)
 Set Columns Span. More...
 
 getColSpan ()
 Get Columns Span. More...
 
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow. More...
 
 getEnableDetailRow ()
 Get EnableDetailRow. More...
 
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info. More...
 
 getEnableNumInfo ()
 Get Enable Item Number Info. More...
 
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty ($a_property)
 
 setProperty ($a_property, $a_value)
 
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getDetailParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 Get Row Template Name. More...
 
 getRowTemplateDir ()
 Get Row Template Directory. More...
 
 addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
 Add Block Command. More...
 
 getBlockCommands ()
 Get Block commands. More...
 
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command. More...
 
 getHeaderCommands ()
 Get Header Block commands. More...
 
 addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
 Add a footer text/link. More...
 
 getFooterLinks ()
 Get footer links. More...
 
 clearFooterLinks ()
 Clear footer links. More...
 
 handleDetailLevel ()
 Handle read/write current detail level. More...
 
 getHTML ()
 Handle config status. More...
 
 fillHeaderCommands ()
 Fill header commands block. More...
 
 fillHeaderTitleBlock ()
 Fill header title block (title and. More...
 
 setDataSection ($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 ($a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 Fill previous/next row. More...
 
 setPreviousNextLinks ()
 Get previous/next linkbar. More...
 
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links. More...
 
 fillDetailRow ()
 Fill Detail Setting Row. More...
 

Static Public Member Functions

static getBlockType ()
 Get block type. More...
 
static isRepositoryObject ()
 Get block type. More...
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 
static getBlockType ()
 
static isRepositoryObject ()
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Static Public Attributes

static $block_type = 'pdportf'
 

Protected Member Functions

 getOverview ()
 Get overview. More...
 
- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 

Protected Attributes

 $default_portfolio = 0
 
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 
 $colspan = 1
 
 $enablenuminfo = true
 
 $detail_min = 0
 
 $detail_max = 0
 
 $bigmode = false
 
 $footer_links = array()
 
 $block_id = 0
 
 $header_commands = array()
 
 $allow_moving = true
 
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
 $enabledetailrow = true
 
 $header_links = array()
 
 $footerinfo = false
 
 $footerinfo_icon = false
 
 $block_commands = array()
 
 $max_count = false
 
 $close_command = false
 
 $image = false
 
 $property = false
 
 $nav_value = ""
 
 $css_row = ""
 
 $dropdown
 

Detailed Description

Portfolio block for PD.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_IsCalledBy ilPDPortfolioBlockGUI: ilColumnGUI

Definition at line 14 of file class.ilPDPortfolioBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPDPortfolioBlockGUI::__construct ( )

Constructor.

Definition at line 22 of file class.ilPDPortfolioBlockGUI.php.

23 {
24 global $lng;
25
26 parent::__construct();
27
28 $this->setLimit(5);
30 }
setLimit($a_limit)
Set Limit.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
global $lng
Definition: privfeed.php:40

References $lng, ilBlockGUI\setAvailableDetailLevels(), and ilBlockGUI\setLimit().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilPDPortfolioBlockGUI::executeCommand ( )

Execute command.

Definition at line 70 of file class.ilPDPortfolioBlockGUI.php.

71 {
72 global $ilCtrl;
73
74 $cmd = $ilCtrl->getCmd('getHTML');
75
76 return $this->$cmd();
77 }
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35

References $cmd, and $ilCtrl.

◆ fillDataSection()

ilPDPortfolioBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 115 of file class.ilPDPortfolioBlockGUI.php.

116 {
117 global $ilUser;
118
119 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
121 $this->setData($data);
122
123 if($this->getCurrentDetailLevel() > 1 && count($this->getData()) > 0)
124 {
125 $this->setRowTemplate("tpl.pd_portf_block_row.html", "Modules/Portfolio");
126 if($this->getCurrentDetailLevel() > 2)
127 {
128 $this->setColSpan(2);
129 }
130 parent::fillDataSection();
131 }
132 else
133 {
134 $this->setEnableNumInfo(false);
135 if (count($this->getData()) == 0)
136 {
137 $this->setEnableDetailRow(false);
138 }
139 $this->setDataSection($this->getOverview());
140 }
141 }
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
getCurrentDetailLevel()
Get Current Detail Level.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
setData($a_data)
Set Data.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setColSpan($a_colspan)
Set Columns Span.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
getData()
Get Data.
static getPortfoliosOfUser($a_user_id)
Get views of user.
global $ilUser
Definition: imgupload.php:15

References ilBlockGUI\$data, $ilUser, ilBlockGUI\getCurrentDetailLevel(), ilBlockGUI\getData(), getOverview(), ilObjPortfolio\getPortfoliosOfUser(), ilBlockGUI\setColSpan(), ilBlockGUI\setData(), ilBlockGUI\setDataSection(), ilBlockGUI\setEnableDetailRow(), ilBlockGUI\setEnableNumInfo(), and ilBlockGUI\setRowTemplate().

+ Here is the call graph for this function:

◆ fillRow()

ilPDPortfolioBlockGUI::fillRow (   $p)

get flat bookmark list for personal desktop

Reimplemented from ilBlockGUI.

Definition at line 146 of file class.ilPDPortfolioBlockGUI.php.

147 {
148 global $ilCtrl, $lng;
149
150 if($this->getCurrentDetailLevel() > 1)
151 {
152 $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", $p["id"]);
153 $this->tpl->setVariable("HREF", $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "preview"));
154 $this->tpl->setVariable("TITLE", trim($p["title"]));
155
156 if ($this->default_portfolio == $p["id"])
157 {
158 // #16490
159 $this->tpl->setVariable("DESC", $lng->txt("prtf_default_portfolio"));
160 }
161
162 $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", "");
163 }
164 }

References $ilCtrl, $lng, and ilBlockGUI\getCurrentDetailLevel().

+ Here is the call graph for this function:

◆ getBlockType()

static ilPDPortfolioBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 36 of file class.ilPDPortfolioBlockGUI.php.

References $block_type.

◆ getHTML()

ilPDPortfolioBlockGUI::getHTML ( )

Execute command.

Reimplemented from ilBlockGUI.

Definition at line 82 of file class.ilPDPortfolioBlockGUI.php.

83 {
85
86 if (!$ilSetting->get('user_portfolios'))
87 {
88 return '';
89 }
90
91 if($this->getCurrentDetailLevel() == 0)
92 {
93 return '';
94 }
95 else
96 {
97 include_once("./Modules/Portfolio/classes/class.ilObjPortfolio.php");
98 $this->default_portfolio = ilObjPortfolio::getDefaultPortfolio($ilUser->getId());
99
100 $lng->loadLanguageModule("prtf");
101 $this->setTitle($lng->txt('prtf_tab_portfolios'));
102 $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui"), ""),
103 $lng->txt("prtf_manage_portfolios"));
104 $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create"),
105 $lng->txt("prtf_add_portfolio"));
106
107 $html = parent::getHTML();
108 return $html;
109 }
110 }
addBlockCommand($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
setTitle($a_title)
Set Title.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
$html
Definition: example_001.php:87
global $ilSetting
Definition: privfeed.php:40

References $html, $ilCtrl, $ilSetting, $ilUser, $lng, ilBlockGUI\addBlockCommand(), ilBlockGUI\getCurrentDetailLevel(), ilObjPortfolio\getDefaultPortfolio(), and ilBlockGUI\setTitle().

+ Here is the call graph for this function:

◆ getOverview()

ilPDPortfolioBlockGUI::getOverview ( )
protected

Get overview.

Definition at line 169 of file class.ilPDPortfolioBlockGUI.php.

170 {
171 global $lng, $ilCtrl;
172
173 if (count($this->getData()) == 0)
174 {
175 // ilias.php?cmd=create&cmdClass=ilobjportfoliogui&cmdNode=5f:o8:oh&baseClass=ilPersonalDesktopGUI
176 return '<div class="small"><a href="'.
177 $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create").
178 '">'.$lng->txt("prtf_add_portfolio").'</a></div>';
179 }
180 else
181 {
182 $t = (count($this->getData()) == 1)
183 ? $lng->txt("obj_prtf")
184 : $lng->txt("prtf_portfolios");
185 return '<div class="small"><a href="'.
186 $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui"), "").
187 '">'.((int)count($this->getData()))." ".$t."</a></div>";
188 }
189 }

References $ilCtrl, $lng, $t, and ilBlockGUI\getData().

Referenced by fillDataSection().

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

◆ getScreenMode()

static ilPDPortfolioBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

Definition at line 53 of file class.ilPDPortfolioBlockGUI.php.

54 {
55 switch($_GET['cmd'])
56 {
57 case '...':
58 return IL_SCREEN_CENTER;
59 break;
60
61 default:
62 return IL_SCREEN_SIDE;
63 break;
64 }
65 }
$_GET["client_id"]
const IL_SCREEN_SIDE
const IL_SCREEN_CENTER

References $_GET, IL_SCREEN_CENTER, and IL_SCREEN_SIDE.

◆ isRepositoryObject()

static ilPDPortfolioBlockGUI::isRepositoryObject ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 45 of file class.ilPDPortfolioBlockGUI.php.

46 {
47 return false;
48 }

Field Documentation

◆ $block_type

ilPDPortfolioBlockGUI::$block_type = 'pdportf'
static

Definition at line 16 of file class.ilPDPortfolioBlockGUI.php.

Referenced by getBlockType().

◆ $default_portfolio

ilPDPortfolioBlockGUI::$default_portfolio = 0
protected

Definition at line 17 of file class.ilPDPortfolioBlockGUI.php.


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