ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilBlockGUI Class Reference

This class represents a block method of a block. More...

+ Inheritance diagram for ilBlockGUI:
+ Collaboration diagram for ilBlockGUI:

Public Member Functions

 __construct ()
 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 ()
 
static isRepositoryObject ()
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Protected Member Functions

 fillRowColor ($a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 

Protected Attributes

 $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

This class represents a block method of a block.

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

Definition at line 12 of file class.ilBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBlockGUI::__construct ( )

Constructor.

Parameters

Definition at line 48 of file class.ilBlockGUI.php.

References $ilCtrl, $ilUser, $tpl, ilYuiUtil\initConnection(), and setLimit().

Referenced by ilPDNewsBlockGUI\__construct().

49  {
50  global $ilUser, $tpl, $ilCtrl;
51 
52  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
54  $tpl->addJavaScript("./Services/Block/js/ilblockcallback.js");
55 
56  $this->setLimit($ilUser->getPref("hits_per_page"));
57  }
static initConnection()
Init YUI Connection module.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
setLimit($a_limit)
Set Limit.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ addBlockCommand()

ilBlockGUI::addBlockCommand (   $a_href,
  $a_text,
  $a_target = "",
  $a_img = "",
  $a_right_aligned = false,
  $a_checked = false,
  $a_html = "" 
)

Add Block Command.

Parameters
string$a_hrefcommand link target
string$a_texttext

Definition at line 546 of file class.ilBlockGUI.php.

References array.

Referenced by ilCalendarSelectionBlockGUI\__construct(), ilPDPortfolioBlockGUI\getHTML(), ilWikiImportantPagesBlockGUI\getHTML(), ilExternalFeedBlockGUI\getHTML(), ilPDExternalFeedBlockGUI\getHTML(), ilPDNewsBlockGUI\getHTML(), ilNewsForContextBlockGUI\getHTML(), ilPollBlockGUI\getHTML(), ilCalendarBlockGUI\getHTML(), and getHTML().

548  {
549  return $this->block_commands[] =
550  array("href" => $a_href,
551  "text" => $a_text, "target" => $a_target, "img" => $a_img,
552  "right" => $a_right_aligned, "checked" => $a_checked, "html" => $a_html);
553  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addFooterLink()

ilBlockGUI::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.

Definition at line 598 of file class.ilBlockGUI.php.

References array.

Referenced by ilBookmarkBlockGUI\setFooterLinks(), ilPDSelectedItemsBlockGUI\setFooterLinks(), ilCalendarBlockGUI\setFooterLinks(), setPreviousNextLinks(), and ilNewsForContextBlockGUI\showViewFooter().

600  {
601  $this->footer_links[] = array(
602  "text" => $a_text,
603  "href" => $a_href,
604  "onclick" => $a_onclick,
605  "block_id" => $a_block_id,
606  "top" => $a_top,
607  "omit_separator" => $a_omit_separator,
608  "checked" => $a_checked);
609  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addHeaderCommand()

ilBlockGUI::addHeaderCommand (   $a_href,
  $a_text,
  $a_as_close = false 
)

Add Header Block Command.

Parameters
string$a_hrefcommand link target
string$a_texttext

Definition at line 571 of file class.ilBlockGUI.php.

References array.

572  {
573  if ($a_as_close)
574  {
575  $this->close_command = $a_href;
576  }
577  else
578  {
579  $this->header_commands[] =
580  array("href" => $a_href,
581  "text" => $a_text);
582  }
583  }
Create styles array
The data for the language used.

◆ addHeaderLink()

ilBlockGUI::addHeaderLink (   $a_href,
  $a_text,
  $status = true 
)

Definition at line 59 of file class.ilBlockGUI.php.

References array.

60  {
61  $this->header_links[] =
62  array('href' => $a_href, 'text' => $a_text, 'status' => (bool)$status);
63  }
Create styles array
The data for the language used.

◆ clearFooterLinks()

ilBlockGUI::clearFooterLinks ( )

Clear footer links.

Definition at line 622 of file class.ilBlockGUI.php.

References array.

Referenced by ilNewsForContextBlockGUI\showViewFooter().

623  {
624  $this->footer_links = array();
625  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ correctOffset()

ilBlockGUI::correctOffset ( )

Definition at line 245 of file class.ilBlockGUI.php.

References setOffset().

Referenced by fillDataSection().

246  {
247  if (!($this->offset < $this->max_count))
248  {
249  $this->setOffset(0);
250  }
251  }
setOffset($a_offset)
Set Offset.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillDataSection()

ilBlockGUI::fillDataSection ( )

Standard implementation for row based data.

Overwrite this and call setContent for other data.

Definition at line 1032 of file class.ilBlockGUI.php.

References $_GET, $_POST, $_SESSION, $data, $nav_value, correctOffset(), fillRow(), fillRowColor(), getData(), getLimit(), getNavParameter(), getOffset(), getRowTemplateDir(), getRowTemplateName(), preloadData(), and setOffset().

Referenced by ilCalendarBlockGUI\fillDataSection(), ilChatroomBlockGUI\getHTML(), and getHTML().

1033  {
1034  $this->nav_value = (isset($_POST[$this->getNavParameter()]) && $_POST[$this->getNavParameter()] != "")
1035  ? $_POST[$this->getNavParameter()]
1036  : (isset($_GET[$this->getNavParameter()]) ? $_GET[$this->getNavParameter()] : $this->nav_value);
1037  $this->nav_value = ($this->nav_value == "" && isset($_SESSION[$this->getNavParameter()]))
1038  ? $_SESSION[$this->getNavParameter()]
1039  : $this->nav_value;
1040 
1042 
1043  $nav = explode(":", $this->nav_value);
1044  if (isset($nav[2]))
1045  {
1046  $this->setOffset($nav[2]);
1047  }
1048  else
1049  {
1050  $this->setOffset(0);
1051  }
1052 
1053  // data
1054  $this->tpl->addBlockFile("BLOCK_ROW", "block_row", $this->getRowTemplateName(),
1055  $this->getRowTemplateDir());
1056 
1057  $data = $this->getData();
1058  $this->max_count = count($data);
1059  $this->correctOffset();
1060  $data = array_slice($data, $this->getOffset(), $this->getLimit());
1061 
1062  $this->preloadData($data);
1063 
1064  foreach($data as $record)
1065  {
1066  $this->tpl->setCurrentBlock("block_row");
1067  $this->fillRowColor();
1068  $this->fillRow($record);
1069  $this->tpl->setCurrentBlock("block_row");
1070  $this->tpl->parseCurrentBlock();
1071  }
1072  }
getRowTemplateDir()
Get Row Template Directory.
$_SESSION["AccountId"]
$_GET["client_id"]
getLimit()
Get Limit.
fillRowColor($a_placeholder="CSS_ROW")
preloadData(array $data)
Can be overwritten in subclasses.
setOffset($a_offset)
Set Offset.
getOffset()
Get Offset.
getData()
Get Data.
getRowTemplateName()
Get Row Template Name.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillDetailRow()

ilBlockGUI::fillDetailRow ( )

Fill Detail Setting Row.

Definition at line 1300 of file class.ilBlockGUI.php.

References $block_id, $detail_min, $ilCtrl, $lng, $start, $text, $url, array, getBlockId(), getBlockType(), getCurrentDetailLevel(), getDetailParameter(), getFooterInfo(), and ilUtil\getImagePath().

Referenced by ilPDSelectedItemsBlockGUI\__construct(), and getHTML().

1301  {
1302  global $ilCtrl, $lng;
1303 
1304  if ($this->enabledetailrow == false)
1305  {
1306  return;
1307  }
1308 
1309  $start = ($this->detail_min < 1)
1310  ? $start = 1
1311  : $this->detail_min;
1312 
1313  $end = ($this->detail_max < $this->detail_min)
1314  ? $this->detail_min
1315  : $this->detail_max;
1316 
1317  $settings = array();
1318  for ($i = $start; $i <= $end; $i++)
1319  {
1320  $settings[] = $i;
1321  }
1322 
1323  if ($end > $start)
1324  {
1325  foreach ($settings as $i)
1326  {
1327  if (($i > $start && $i > 1))
1328  {
1329  //$this->tpl->touchBlock("det_delim");
1330  //$this->tpl->touchBlock("det_item");
1331  }
1332 // if ($i != $this->getCurrentDetailLevel())
1333 // {
1334  $ilCtrl->setParameterByClass("ilcolumngui",
1335  $this->getDetailParameter(), $i);
1336 
1337  $onclick = $onclick_id = "";
1338 
1339  // ajax link
1340  if ($i > 0)
1341  {
1342  $ilCtrl->setParameterByClass("ilcolumngui",
1343  "block_id", "block_".$this->getBlockType()."_".$this->block_id);
1344  $onclick = $ilCtrl->getLinkTargetByClass("ilcolumngui",
1345  "updateBlock", "", true);
1346  $onclick_id = "block_".$this->getBlockType()."_".$this->block_id;
1347  $ilCtrl->setParameterByClass("ilcolumngui",
1348  "block_id", "");
1349  }
1350 
1351  // normal link
1352  //$icon = ilUtil::getImagePath("details".$i.".svg");
1353  $text = $lng->txt("details")." ".$i;
1354  $url = $ilCtrl->getLinkTargetByClass("ilcolumngui", "");
1355 
1356  if($onclick)
1357  {
1358  $onclick = "ilBlockJSHandler('".$onclick_id."','".$onclick."')";
1359  }
1360 
1361  $checked = ($i == $this->getCurrentDetailLevel());
1362  $this->dropdown[] = array("text" => $text,
1363  "image" => $icon,
1364  "href" => $url,
1365  "onclick" => $onclick,
1366  "checked" => $checked);
1367 // }
1368  }
1369 
1370  // info + icon in detail row
1371  if ($this->getFooterInfo(true) != "")
1372  {
1373  $this->tpl->setCurrentBlock("det_info");
1374  $this->tpl->setVariable("INFO_TEXT", $this->getFooterInfo(true));
1375  $this->tpl->setVariable("ALT_DET_INFO", $lng->txt("info_short"));
1376  $this->tpl->setVariable("DI_BLOCK_ID", $this->getBlockType()."_".$this->getBlockId());
1377  $this->tpl->setVariable("IMG_DET_INFO", ilUtil::getImagePath("icon_info.svg"));
1378  $this->tpl->parseCurrentBlock();
1379  }
1380 
1381  /*
1382  $this->tpl->setCurrentBlock("detail_setting");
1383  $this->tpl->setVariable("TXT_DETAILS", $lng->txt("details"));
1384  $this->tpl->setVariable("DCOLSPAN", $this->getColSpan());
1385  $this->tpl->parseCurrentBlock();
1386  */
1387 
1388  $ilCtrl->setParameterByClass("ilcolumngui",
1389  $this->getDetailParameter(), "");
1390  }
1391  }
$url
Definition: shib_logout.php:72
global $ilCtrl
Definition: ilias.php:18
static getBlockType()
getFooterInfo($a_hide_and_icon=false)
Get Footer Info.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Create styles array
The data for the language used.
getBlockId()
Get Block Id.
global $lng
Definition: privfeed.php:17
$text
getCurrentDetailLevel()
Get Current Detail Level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillFooter()

ilBlockGUI::fillFooter ( )

Definition at line 1082 of file class.ilBlockGUI.php.

Referenced by getHTML().

1083  {
1084  }
+ Here is the caller graph for this function:

◆ fillFooterLinks()

ilBlockGUI::fillFooterLinks (   $a_top = false,
  $a_numinfo = "" 
)

Fill footer links.

Returns
array linkbar or false on error

Definition at line 1209 of file class.ilBlockGUI.php.

References $ilCtrl, $lng, and getFooterLinks().

Referenced by ilPDContentBlockGUI\fillFooter(), ilBookmarkBlockGUI\fillFooter(), ilPDTaggingBlockGUI\fillFooter(), ilPDSelectedItemsBlockGUI\fillFooter(), ilCalendarBlockGUI\fillFooter(), fillPreviousNext(), and ilNewsForContextBlockGUI\showViewFooter().

1210  {
1211  global $ilCtrl, $lng;
1212 
1213  $first = true;
1214  $flinks = $this->getFooterLinks();
1215 
1216  $prefix = ($a_top) ? "top" : "foot";
1217 
1218  $has_link = false;
1219 
1220  $omit_separator = false;
1221  foreach($flinks as $flink)
1222  {
1223  if ($flink["top"] != $a_top)
1224  {
1225  continue;
1226  }
1227 
1228  if(!$a_top)
1229  {
1230  if($flink["onclick"])
1231  {
1232  $flink["onclick"] = "ilBlockJSHandler('".$flink["block_id"].
1233  "','".$flink["onclick"]."')";
1234  }
1235  $this->dropdown[] = $flink;
1236  continue;
1237  }
1238 
1239  $has_link = true;
1240 
1241  if (!$first && !$omit_separator)
1242  {
1243  $this->tpl->touchBlock($prefix."_delim");
1244  $this->tpl->touchBlock($prefix."_item");
1245  }
1246 
1247  // ajax link
1248  if ($flink["onclick"] != "")
1249  {
1250  $this->tpl->setCurrentBlock($prefix."_onclick");
1251  $this->tpl->setVariable("OC_BLOCK_ID",
1252  $flink["block_id"]);
1253  $this->tpl->setVariable("OC_HREF",
1254  $flink["onclick"]);
1255  $this->tpl->parseCurrentBlock();
1256  }
1257 
1258  // normal link
1259  if ($flink["href"] != "")
1260  {
1261  // normal link
1262  $this->tpl->setCurrentBlock($prefix."_link");
1263  $this->tpl->setVariable("FHREF",
1264  $flink["href"]);
1265  $this->tpl->setVariable("FLINK", $flink["text"]);
1266  $this->tpl->parseCurrentBlock();
1267  $this->tpl->touchBlock($prefix."_item");
1268  }
1269  else
1270  {
1271  $this->tpl->setCurrentBlock($prefix."_text");
1272  $this->tpl->setVariable("FTEXT", $flink["text"]);
1273  $this->tpl->parseCurrentBlock();
1274  $this->tpl->touchBlock($prefix."_item");
1275  }
1276 
1277  $first = false;
1278  $omit_separator = $flink["omit_separator"];
1279  }
1280 
1281  if ($a_numinfo != "" && $has_link)
1282  {
1283  $this->tpl->setVariable("NUMINFO", $a_numinfo);
1284  $first = false;
1285  }
1286 
1287  /*
1288  if (!$first)
1289  {
1290  $this->tpl->setVariable("PCOLSPAN", $this->getColSpan());
1291  $this->tpl->setCurrentBlock($prefix."_row");
1292  $this->tpl->parseCurrentBlock();
1293  }
1294  */
1295  }
getFooterLinks()
Get footer links.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillHeaderCommands()

ilBlockGUI::fillHeaderCommands ( )

Fill header commands block.

Definition at line 907 of file class.ilBlockGUI.php.

References $close_command, $dropdown, $ilCtrl, $img, $lng, $url, array, getBlockType(), getDetailParameter(), getHeaderCommands(), ilUtil\getImagePath(), getRepositoryMode(), ilAdvancedSelectionListGUI\ICON_CONFIG, and ilAdvancedSelectionListGUI\STYLE_LINK_BUTTON.

Referenced by getHTML().

908  {
909  global $lng, $ilCtrl;
910 
911  // header commands
912  if (count($this->getHeaderCommands()) > 0 ||
913  ($this->detail_max > $this->detail_min && $this->detail_min == 0) ||
914  $this->close_command != "")
915  {
916 
917  foreach($this->getHeaderCommands() as $command)
918  {
919  $this->tpl->setCurrentBlock("header_command");
920  $this->tpl->setVariable("HREF_HCOMM", $command["href"]);
921  $this->tpl->setVariable("TXT_HCOMM", $command["text"]);
922  $this->tpl->parseCurrentBlock();
923  }
924 
925  // close button
926  if (($this->detail_max > $this->detail_min && $this->detail_min == 0 &&
927  !$this->getRepositoryMode())
928  ||
929  $this->close_command != "")
930  {
931  $alt = $lng->txt("hide");
932  if ($this->close_command != "")
933  {
935  }
936  else
937  {
938  $ilCtrl->setParameterByClass("ilcolumngui",
939  $this->getDetailParameter(), "0");
940  $url = $ilCtrl->getLinkTargetByClass("ilcolumngui", "");
941  $ilCtrl->setParameterByClass("ilcolumngui",
942  $this->getDetailParameter(), "");
943  }
944 
945  $this->dropdown[] = array("text" => $alt,
946  "image" => $img,
947  "href" => $url);
948  }
949 
950  $this->tpl->setCurrentBlock("header_commands");
951  $this->tpl->parseCurrentBlock();
952  }
953 
954  // adv selection gui
955  include_once "Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
957  $dropdown->setUseImages(true);
960  $dropdown->setId("block_dd_".$this->getBlockType()."_".$this->block_id);
961  foreach($this->dropdown as $item)
962  {
963  if($item["href"] || $item["onclick"])
964  {
965  if ($item["checked"])
966  {
967  $item["image"] = ilUtil::getImagePath("icon_checked.svg");
968  }
969  $dropdown->addItem($item["text"], "", $item["href"], $item["image"],
970  $item["text"], "", "", false, $item["onclick"]);
971  }
972  }
973  $dropdown = $dropdown->getHTML();
974  $this->tpl->setCurrentBlock("header_dropdown");
975  $this->tpl->setVariable("ADV_DROPDOWN", $dropdown);
976  $this->tpl->parseCurrentBlock();
977 
978  $this->tpl->setCurrentBlock("hitem");
979  $this->tpl->parseCurrentBlock();
980  }
getHeaderCommands()
Get Header Block commands.
$url
Definition: shib_logout.php:72
getRepositoryMode()
Get RepositoryMode.
global $ilCtrl
Definition: ilias.php:18
static getBlockType()
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillHeaderTitleBlock()

ilBlockGUI::fillHeaderTitleBlock ( )

Fill header title block (title and.

Definition at line 986 of file class.ilBlockGUI.php.

References $lng, array, getBlockType(), getImage(), and getTitle().

Referenced by getHTML().

987  {
988  global $lng;
989 
990  // image
991  if ($this->getImage() != "")
992  {
993  $this->tpl->setCurrentBlock("block_img");
994  $this->tpl->setVariable("IMG_BLOCK", $this->getImage());
995  $this->tpl->setVariable("IMID",
996  "block_".$this->getBlockType()."_".$this->block_id);
997  $this->tpl->setVariable("IMG_ALT",
998  str_replace(array("'",'"'), "", strip_tags($lng->txt("icon")." ".$this->getTitle())));
999  $this->tpl->parseCurrentBlock();
1000  }
1001 
1002  // header title
1003  $this->tpl->setCurrentBlock("header_title");
1004  $this->tpl->setVariable("BTID",
1005  "block_".$this->getBlockType()."_".$this->block_id);
1006  $this->tpl->setVariable("BLOCK_TITLE",
1007  $this->getTitle());
1008  $this->tpl->setVariable("TXT_BLOCK",
1009  $lng->txt("block"));
1010  $this->tpl->parseCurrentBlock();
1011 
1012  $this->tpl->setCurrentBlock("hitem");
1013  $this->tpl->parseCurrentBlock();
1014  }
getImage()
Get Image.
static getBlockType()
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
getTitle()
Get Title.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPreviousNext()

ilBlockGUI::fillPreviousNext ( )

Fill previous/next row.

Definition at line 1097 of file class.ilBlockGUI.php.

References $ilCtrl, $lng, $max_count, $start, fillFooterLinks(), getEnableNumInfo(), getLimit(), getOffset(), and setPreviousNextLinks().

Referenced by getHTML().

1098  {
1099  global $lng, $ilCtrl;
1100 
1101  $pn = false;
1102 
1103  // table pn numinfo
1104  $numinfo = "";
1105  if ($this->getEnableNumInfo() && $this->max_count > 0)
1106  {
1107  $start = $this->getOffset() + 1; // compute num info
1108  $end = $this->getOffset() + $this->getLimit();
1109 
1110  if ($end > $this->max_count or $this->getLimit() == 0)
1111  {
1112  $end = $this->max_count;
1113  }
1114 
1115  $numinfo = "(".$start."-".$end." ".strtolower($lng->txt("of"))." ".$this->max_count.")";
1116  }
1117 
1118  $this->setPreviousNextLinks();
1119  $this->fillFooterLinks(true, $numinfo);
1120 
1121  }
getLimit()
Get Limit.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
global $ilCtrl
Definition: ilias.php:18
getEnableNumInfo()
Get Enable Item Number Info.
setPreviousNextLinks()
Get previous/next linkbar.
getOffset()
Get Offset.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilBlockGUI::fillRow (   $a_set)

Definition at line 1074 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

1075  {
1076  foreach ($a_set as $key => $value)
1077  {
1078  $this->tpl->setVariable("VAL_".strtoupper($key), $value);
1079  }
1080  }
+ Here is the caller graph for this function:

◆ fillRowColor()

ilBlockGUI::fillRowColor (   $a_placeholder = "CSS_ROW")
finalprotected

Definition at line 1086 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

1087  {
1088  $this->css_row = ($this->css_row != "ilBlockRow1")
1089  ? "ilBlockRow1"
1090  : "ilBlockRow2";
1091  $this->tpl->setVariable($a_placeholder, $this->css_row);
1092  }
+ Here is the caller graph for this function:

◆ getAdminCommands()

ilBlockGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

Definition at line 402 of file class.ilBlockGUI.php.

Referenced by getHTML().

403  {
404  return $this->admincommands;
405  }
+ Here is the caller graph for this function:

◆ getBigMode()

ilBlockGUI::getBigMode ( )

Get Big Mode.

Returns
boolean Big Mode

Definition at line 105 of file class.ilBlockGUI.php.

References $bigmode.

Referenced by getHTML().

106  {
107  return $this->bigmode;
108  }
+ Here is the caller graph for this function:

◆ getBlockCommands()

ilBlockGUI::getBlockCommands ( )

Get Block commands.

Returns
array block commands

Definition at line 560 of file class.ilBlockGUI.php.

References $block_commands.

Referenced by getHTML().

561  {
562  return $this->block_commands;
563  }
+ Here is the caller graph for this function:

◆ getBlockId()

◆ getBlockType()

static ilBlockGUI::getBlockType ( )
staticabstract

◆ getColSpan()

ilBlockGUI::getColSpan ( )

Get Columns Span.

Returns
int Columns Span

Definition at line 422 of file class.ilBlockGUI.php.

References $colspan.

Referenced by ilBookmarkBlockGUI\fillFooter(), ilPDTaggingBlockGUI\fillFooter(), ilPDSelectedItemsBlockGUI\fillFooter(), ilCalendarBlockGUI\fillFooter(), and getHTML().

423  {
424  return $this->colspan;
425  }
+ Here is the caller graph for this function:

◆ getConfigParameter()

ilBlockGUI::getConfigParameter ( )
final

Definition at line 510 of file class.ilBlockGUI.php.

References getBlockId(), and getBlockType().

511  {
512  return $this->getBlockType()."_".$this->getBlockId()."_blconf";
513  }
static getBlockType()
getBlockId()
Get Block Id.
+ Here is the call graph for this function:

◆ getCurrentDetailLevel()

ilBlockGUI::getCurrentDetailLevel ( )

Get Current Detail Level.

Returns
int Current Detail Level

Definition at line 180 of file class.ilBlockGUI.php.

Referenced by ilPDNewsBlockGUI\__construct(), ilNewsForContextBlockGUI\__construct(), ilPDNotesBlockGUI\fillDataSection(), ilBookmarkBlockGUI\fillDataSection(), ilForumPostingDraftsBlockGUI\fillDataSection(), ilPDPortfolioBlockGUI\fillDataSection(), ilPDTaggingBlockGUI\fillDataSection(), ilExternalFeedBlockGUI\fillDataSection(), ilPDMailBlockGUI\fillDataSection(), ilPDExternalFeedBlockGUI\fillDataSection(), ilUsersOnlineBlockGUI\fillDataSection(), ilPDNewsBlockGUI\fillDataSection(), ilNewsForContextBlockGUI\fillDataSection(), ilCalendarBlockGUI\fillDataSection(), fillDetailRow(), ilForumPostingDraftsBlockGUI\fillRow(), ilPDPortfolioBlockGUI\fillRow(), ilPDMailBlockGUI\fillRow(), ilPDNotesBlockGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilBookmarkBlockGUI\fillRow(), ilNewsForContextBlockGUI\fillRow(), ilPDSysMessageBlockGUI\getHTML(), ilPDPortfolioBlockGUI\getHTML(), ilChatroomBlockGUI\getHTML(), ilPDMailBlockGUI\getHTML(), ilPDNotesBlockGUI\getHTML(), ilBookmarkBlockGUI\getHTML(), ilPDTaggingBlockGUI\getHTML(), ilUsersOnlineBlockGUI\getHTML(), ilExternalFeedBlockGUI\getHTML(), ilPDExternalFeedBlockGUI\getHTML(), ilPDNewsBlockGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilPDSelectedItemsBlockGUI\getMembershipItemsPerLocation(), ilPDSelectedItemsBlockGUI\getMembershipItemsPerType(), ilPDSelectedItemsBlockGUI\getSelectedItemsPerLocation(), ilPDSelectedItemsBlockGUI\getSelectedItemsPerType(), ilPDTaggingBlockGUI\getTagCloud(), ilForumPostingDraftsBlockGUI\isRepositoryObject(), and ilCalendarBlockGUI\setFooterLinks().

181  {
182  return $this->currentdetaillevel;
183  }
+ Here is the caller graph for this function:

◆ getData()

◆ getDetailParameter()

ilBlockGUI::getDetailParameter ( )
final

Definition at line 505 of file class.ilBlockGUI.php.

References getBlockId(), and getBlockType().

Referenced by fillDetailRow(), fillHeaderCommands(), and handleDetailLevel().

506  {
507  return $this->getBlockType()."_".$this->getBlockId()."_bldet";
508  }
static getBlockType()
getBlockId()
Get Block Id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEnableDetailRow()

ilBlockGUI::getEnableDetailRow ( )

Get EnableDetailRow.

Returns
boolean EnableDetailRow

Definition at line 442 of file class.ilBlockGUI.php.

References $enabledetailrow.

443  {
444  return $this->enabledetailrow;
445  }

◆ getEnableEdit()

ilBlockGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean EnableEdit

Definition at line 288 of file class.ilBlockGUI.php.

289  {
290  return $this->enableedit;
291  }

◆ getEnableNumInfo()

ilBlockGUI::getEnableNumInfo ( )

Get Enable Item Number Info.

Returns
boolean Enable Item Number Info

Definition at line 463 of file class.ilBlockGUI.php.

References $enablenuminfo.

Referenced by ilPDContentBlockGUI\fillFooter(), and fillPreviousNext().

464  {
465  return $this->enablenuminfo;
466  }
+ Here is the caller graph for this function:

◆ getFooterInfo()

ilBlockGUI::getFooterInfo (   $a_hide_and_icon = false)

Get Footer Info.

Returns
string Footer Info

Definition at line 335 of file class.ilBlockGUI.php.

References $footerinfo, and $footerinfo_icon.

Referenced by fillDetailRow(), and getHTML().

336  {
337  if ($a_hide_and_icon)
338  {
339  return $this->footerinfo_icon;
340  }
341  else
342  {
343  return $this->footerinfo;
344  }
345  }
+ Here is the caller graph for this function:

◆ getFooterLinks()

ilBlockGUI::getFooterLinks ( )

Get footer links.

Definition at line 614 of file class.ilBlockGUI.php.

References $footer_links.

Referenced by fillFooterLinks().

615  {
616  return $this->footer_links;
617  }
+ Here is the caller graph for this function:

◆ getGuiObject()

ilBlockGUI::getGuiObject ( )

Get GuiObject.

Returns
object GUI object

Definition at line 170 of file class.ilBlockGUI.php.

171  {
172  return $this->gui_object;
173  }

◆ getHeaderCommands()

ilBlockGUI::getHeaderCommands ( )

Get Header Block commands.

Returns
array header block commands

Definition at line 590 of file class.ilBlockGUI.php.

References $header_commands.

Referenced by fillHeaderCommands().

591  {
592  return $this->header_commands;
593  }
+ Here is the caller graph for this function:

◆ getHeaderLinks()

ilBlockGUI::getHeaderLinks ( )

Definition at line 65 of file class.ilBlockGUI.php.

References $header_links.

Referenced by getHTML().

66  {
67  return $this->header_links;
68  }
+ Here is the caller graph for this function:

◆ getHTML()

ilBlockGUI::getHTML ( )

Handle config status.

Get HTML.

Definition at line 693 of file class.ilBlockGUI.php.

References $_GET, $counter, $ilCtrl, $ilUser, $lng, ilObject\_lookupType(), addBlockCommand(), array, fillDataSection(), fillDetailRow(), fillFooter(), fillHeaderCommands(), fillHeaderTitleBlock(), fillPreviousNext(), getAdminCommands(), getBigMode(), getBlockCommands(), getBlockType(), getColSpan(), getFooterInfo(), getHeaderLinks(), getRefId(), getRepositoryMode(), and isRepositoryObject().

Referenced by ilPDNewsBlockGUI\getHTML(), and ilForumPostingDraftsBlockGUI\isRepositoryObject().

694  {
695  global $ilCtrl, $lng, $ilAccess, $ilUser;
696 
697  if ($this->isRepositoryObject())
698  {
699  if (!$ilAccess->checkAccess("read", "", $this->getRefId()))
700  {
701  return "";
702  }
703  }
704 
705  $this->tpl = new ilTemplate("tpl.block.html", true, true, "Services/Block");
706 
707 // $this->handleConfigStatus();
708 
709  $this->fillDataSection();
710 
711  if ($this->getRepositoryMode() && $this->isRepositoryObject())
712  {
713  // #10993
714  if ($this->getAdminCommands())
715  {
716  $this->tpl->setCurrentBlock("block_check");
717  $this->tpl->setVariable("BL_REF_ID", $this->getRefId());
718  $this->tpl->parseCurrentBlock();
719  }
720 
721  if ($ilAccess->checkAccess("delete", "", $this->getRefId()))
722  {
723  $this->addBlockCommand(
724  "ilias.php?baseClass=ilRepositoryGUI&ref_id=".$_GET["ref_id"]."&cmd=delete".
725  "&item_ref_id=".$this->getRefId(),
726  $lng->txt("delete"));
727 
728  // see ilObjectListGUI::insertCutCommand();
729  $this->addBlockCommand(
730  "ilias.php?baseClass=ilRepositoryGUI&ref_id=".$_GET["ref_id"]."&cmd=cut".
731  "&item_ref_id=".$this->getRefId(),
732  $lng->txt("move"));
733  }
734 
735  // #14595 - see ilObjectListGUI::insertCopyCommand()
736  if ($ilAccess->checkAccess("copy", "", $this->getRefId()))
737  {
738  global $objDefinition;
739  $parent_type = ilObject::_lookupType($_GET["ref_id"], true);
740  $parent_gui = "ilObj".$objDefinition->getClassName($parent_type)."GUI";
741 
742  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $this->getRefId());
743  $copy_cmd = $ilCtrl->getLinkTargetByClass(
744  array("ilrepositorygui", $parent_gui, "ilobjectcopygui"),
745  "initTargetSelection");
746 
747  // see ilObjectListGUI::insertCopyCommand();
748  $this->addBlockCommand(
749  $copy_cmd,
750  $lng->txt("copy"));
751  }
752  }
753 
754  // footer info
755  if ($this->getFooterInfo() != "")
756  {
757  $this->tpl->setCurrentBlock("footer_information");
758  $this->tpl->setVariable("FOOTER_INFO", $this->getFooterInfo());
759  $this->tpl->setVariable("FICOLSPAN", $this->getColSpan());
760  $this->tpl->parseCurrentBlock();
761  }
762 
763  $this->dropdown = array();
764 
765  // commands
766  if (count($this->getBlockCommands()) > 0)
767  {
768  $has_block_command = false;
769 
770  foreach($this->getBlockCommands() as $command)
771  {
772  if(!$command["img"] && !$command["html"])
773  {
774  $this->dropdown[] = $command;
775  continue;
776  }
777 
778  $has_block_command = true;
779 
780  if ($command["target"] != "")
781  {
782  $this->tpl->setCurrentBlock("bc_target");
783  $this->tpl->setVariable("CMD_TARGET", $command["target"]);
784  $this->tpl->parseCurrentBlock();
785  }
786 
787  if ($command["img"] != "")
788  {
789  $this->tpl->setCurrentBlock("bc_image");
790  $this->tpl->setVariable("SRC_BC", $command["img"]);
791  $this->tpl->setVariable("ALT_BC", $command["text"]);
792  $this->tpl->parseCurrentBlock();
793  $this->tpl->setCurrentBlock("block_command");
794  }
795  else if ($command["html"] != "")
796  {
797  $this->tpl->setCurrentBlock("bc_html");
798  $this->tpl->setVariable("HTML", $command["html"]);
799  $this->tpl->parseCurrentBlock();
800  $this->tpl->setCurrentBlock("block_command");
801  }
802  else
803  {
804  $this->tpl->setCurrentBlock("block_command");
805  $this->tpl->setVariable("CMD_TEXT", $command["text"]);
806  $this->tpl->setVariable("BC_CLASS", 'class="il_ContainerItemCommand"');
807  }
808 
809  $this->tpl->setVariable("CMD_HREF", $command["href"]);
810  $this->tpl->parseCurrentBlock();
811  }
812 
813  if($has_block_command)
814  {
815  $this->tpl->setCurrentBlock("block_commands");
816  $this->tpl->setVariable("CCOLSPAN", $this->getColSpan());
817  $this->tpl->parseCurrentBlock();
818  }
819  }
820 
821  // fill previous next
822  $this->fillPreviousNext();
823 
824  // fill footer
825  $this->fillFooter();
826 
827  // fill row for setting details
828  $this->fillDetailRow();
829 
830  // header links
831  if(count($this->getHeaderLinks()))
832  {
833  $counter = 0;
834  foreach($this->getHeaderLinks() as $command)
835  {
836  if($counter > 0)
837  {
838  $this->tpl->setCurrentBlock('head_delim');
839  $this->tpl->touchBlock('head_delim');
840  $this->tpl->parseCurrentBlock();
841  }
842  if($command['status'] == true)
843  {
844  $this->tpl->setCurrentBlock('head_link');
845  $this->tpl->setVariable('HHREF', $command['href']);
846  $this->tpl->setVariable('HLINK', $command['text']);
847  $this->tpl->parseCurrentBlock();
848  }
849  else
850  {
851  $this->tpl->setCurrentBlock('head_text');
852  $this->tpl->setVariable('HTEXT', $command['text']);
853  $this->tpl->parseCurrentBlock();
854  }
855 
856  $this->tpl->setCurrentBlock('head_item');
857  $this->tpl->parseCurrentBlock();
858 
859  ++$counter;
860  }
861 
862  $this->tpl->setCurrentBlock('header_links');
863  $this->tpl->parseCurrentBlock();
864  }
865 
866  // for screen readers we first output the title and the commands
867  // (e.g. close icon afterwards), otherwise we first output the
868  // header commands, since we want to have the close icon top right
869  // and not floated after the title
870  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization"))
871  {
872  $this->fillHeaderTitleBlock();
873  $this->fillHeaderCommands();
874  }
875  else
876  {
877  $this->fillHeaderCommands();
878  $this->fillHeaderTitleBlock();
879  }
880 
881  $this->tpl->setVariable("COLSPAN", $this->getColSpan());
882  if ($this->getBigMode())
883  {
884  $this->tpl->touchBlock("hclassb");
885  }
886  else
887  {
888  $this->tpl->touchBlock("hclass");
889  }
890 
891  if ($ilCtrl->isAsynch())
892  {
893  // return without div wrapper
894  echo $this->tpl->getAsynch();
895  }
896  else
897  {
898  // return incl. wrapping div with id
899  return '<div id="'."block_".$this->getBlockType()."_".$this->block_id.'">'.
900  $this->tpl->get().'</div>';
901  }
902  }
$_GET["client_id"]
addBlockCommand($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
getRepositoryMode()
Get RepositoryMode.
fillHeaderTitleBlock()
Fill header title block (title and.
global $ilCtrl
Definition: ilias.php:18
fillDetailRow()
Fill Detail Setting Row.
$counter
getBlockCommands()
Get Block commands.
static getBlockType()
fillHeaderCommands()
Fill header commands block.
getFooterInfo($a_hide_and_icon=false)
Get Footer Info.
special template class to simplify handling of ITX/PEAR
getBigMode()
Get Big Mode.
static isRepositoryObject()
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
getAdminCommands()
Get Administration Commmands.
getRefId()
Get Ref Id (only used if isRepositoryObject() is true).
global $lng
Definition: privfeed.php:17
fillPreviousNext()
Fill previous/next row.
getColSpan()
Get Columns Span.
fillDataSection()
Standard implementation for row based data.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getImage()

ilBlockGUI::getImage ( )

Get Image.

Returns
string Image

Definition at line 220 of file class.ilBlockGUI.php.

References $image.

Referenced by fillHeaderTitleBlock().

221  {
222  return $this->image;
223  }
+ Here is the caller graph for this function:

◆ getLimit()

ilBlockGUI::getLimit ( )

Get Limit.

Returns
int Limit

Definition at line 268 of file class.ilBlockGUI.php.

Referenced by fillDataSection(), fillPreviousNext(), and setPreviousNextLinks().

269  {
270  return $this->limit;
271  }
+ Here is the caller graph for this function:

◆ getMoveParameter()

ilBlockGUI::getMoveParameter ( )
final

Definition at line 515 of file class.ilBlockGUI.php.

References getBlockId(), and getBlockType().

516  {
517  return $this->getBlockType()."_".$this->getBlockId()."_blmove";
518  }
static getBlockType()
getBlockId()
Get Block Id.
+ Here is the call graph for this function:

◆ getNavParameter()

ilBlockGUI::getNavParameter ( )
final

Definition at line 500 of file class.ilBlockGUI.php.

References getBlockId(), and getBlockType().

Referenced by fillDataSection(), and setPreviousNextLinks().

501  {
502  return $this->getBlockType()."_".$this->getBlockId()."_blnav";
503  }
static getBlockType()
getBlockId()
Get Block Id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOffset()

ilBlockGUI::getOffset ( )

Get Offset.

Returns
int Offset

Definition at line 240 of file class.ilBlockGUI.php.

Referenced by fillDataSection(), fillPreviousNext(), and setPreviousNextLinks().

241  {
242  return $this->offset;
243  }
+ Here is the caller graph for this function:

◆ getProperty()

ilBlockGUI::getProperty (   $a_property)

Definition at line 479 of file class.ilBlockGUI.php.

Referenced by ilNewsForContextBlockGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilNewsForContextBlockGUI\initSettingsForm(), ilNewsForContextBlockGUI\saveSettings(), and ilNewsForContextBlockGUI\showNews().

480  {
481  return $this->property[$a_property];
482  }
+ Here is the caller graph for this function:

◆ getRefId()

ilBlockGUI::getRefId ( )

Get Ref Id (only used if isRepositoryObject() is true).

Returns
int Ref Id

Definition at line 382 of file class.ilBlockGUI.php.

Referenced by ilPollBlockGUI\commentJSCall(), ilPollBlockGUI\fillRow(), ilExternalFeedBlockGUI\getHTML(), ilPollBlockGUI\getHTML(), and getHTML().

383  {
384  return $this->refid;
385  }
+ Here is the caller graph for this function:

◆ getRepositoryMode()

ilBlockGUI::getRepositoryMode ( )

Get RepositoryMode.

Returns
boolean RepositoryMode

Definition at line 308 of file class.ilBlockGUI.php.

Referenced by fillHeaderCommands(), ilNewsForContextBlockGUI\getHTML(), and getHTML().

309  {
310  return $this->repositorymode;
311  }
+ Here is the caller graph for this function:

◆ getRowTemplateDir()

ilBlockGUI::getRowTemplateDir ( )

Get Row Template Directory.

Returns
string Row Template Directory

Definition at line 535 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

536  {
537  return $this->rowtemplatedir;
538  }
+ Here is the caller graph for this function:

◆ getRowTemplateName()

ilBlockGUI::getRowTemplateName ( )

Get Row Template Name.

Returns
string Row Template Name

Definition at line 525 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

526  {
527  return $this->rowtemplatename;
528  }
+ Here is the caller graph for this function:

◆ getScreenMode()

static ilBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Definition at line 630 of file class.ilBlockGUI.php.

References IL_SCREEN_SIDE.

631  {
632  return IL_SCREEN_SIDE;
633  }
const IL_SCREEN_SIDE

◆ getSubtitle()

ilBlockGUI::getSubtitle ( )

Get Subtitle.

Returns
string Subtitle

Definition at line 362 of file class.ilBlockGUI.php.

363  {
364  return $this->subtitle;
365  }

◆ getTitle()

◆ handleDetailLevel()

ilBlockGUI::handleDetailLevel ( )

Handle read/write current detail level.

Definition at line 638 of file class.ilBlockGUI.php.

References $_GET, $block_id, $ilCtrl, $ilUser, ilBlockSetting\_lookupDetailLevel(), ilBlockSetting\_writeDetailLevel(), getBlockType(), getDetailParameter(), and setCurrentDetailLevel().

Referenced by setAvailableDetailLevels().

639  {
640  global $ilUser, $ilCtrl;
641 
642  // set/get detail level
643  if ($this->detail_max > $this->detail_min)
644  {
645  include_once("Services/Block/classes/class.ilBlockSetting.php");
646  if (isset($_GET[$this->getDetailParameter()]))
647  {
649  $ilUser->getId(), $this->block_id);
651  if ((int) $_GET[$this->getDetailParameter()] == 0)
652  {
653  $ilCtrl->redirectByClass("ilcolumngui", "");
654  }
655  }
656  else
657  {
659  $ilUser->getId(), $this->block_id));
660  }
661  }
662  }
static _writeDetailLevel($a_type, $a_value, $a_user=0, $a_block_id=0)
Write detail level to database.
$_GET["client_id"]
static _lookupDetailLevel($a_type, $a_user=0, $a_block_id=0)
Lookup detail level.
global $ilCtrl
Definition: ilias.php:18
static getBlockType()
$ilUser
Definition: imgupload.php:18
setCurrentDetailLevel($a_currentdetaillevel)
Set Current Detail Level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

static ilBlockGUI::isRepositoryObject ( )
staticabstract

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ preloadData()

ilBlockGUI::preloadData ( array  $data)
protected

Can be overwritten in subclasses.

Only the visible part of the complete data was passed so a preload of the visible data is possible.

Parameters
array$data

Definition at line 1397 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

1398  {
1399  }
+ Here is the caller graph for this function:

◆ setAdminCommands()

ilBlockGUI::setAdminCommands (   $a_admincommands)

Set Administration Commmands.

Parameters
boolean$a_admincommandsAdministration Commmands

Definition at line 392 of file class.ilBlockGUI.php.

393  {
394  $this->admincommands = $a_admincommands;
395  }

◆ setAvailableDetailLevels()

ilBlockGUI::setAvailableDetailLevels (   $a_max,
  $a_min = 0 
)

Set Available Detail Levels.

Parameters
int$a_maxMax Level
int$a_minMin Level (Default 0)

Definition at line 136 of file class.ilBlockGUI.php.

References handleDetailLevel().

Referenced by ilPDMailBlockGUI\__construct(), ilPDSysMessageBlockGUI\__construct(), ilPDPortfolioBlockGUI\__construct(), ilBookmarkBlockGUI\__construct(), ilPDNotesBlockGUI\__construct(), ilUsersOnlineBlockGUI\__construct(), ilPDNewsBlockGUI\__construct(), ilNewsForContextBlockGUI\__construct(), ilChatroomBlockGUI\__construct(), ilPDSelectedItemsBlockGUI\__construct(), ilPDTaggingBlockGUI\__construct(), ilCalendarBlockGUI\__construct(), ilPDSelectedItemsBlockGUI\manageObject(), ilExternalFeedBlockGUI\setBlock(), and ilPDExternalFeedBlockGUI\setBlock().

137  {
138  $this->detail_min = $a_min;
139  $this->detail_max = $a_max;
140  $this->handleDetailLevel();
141  }
handleDetailLevel()
Handle read/write current detail level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBigMode()

ilBlockGUI::setBigMode (   $a_bigmode)

Set Big Mode.

Parameters
boolean$a_bigmodeBig Mode

Definition at line 95 of file class.ilBlockGUI.php.

Referenced by ilPDContentBlockGUI\__construct().

96  {
97  $this->bigmode = $a_bigmode;
98  }
+ Here is the caller graph for this function:

◆ setBlockId()

ilBlockGUI::setBlockId (   $a_block_id = 0)

Set Block Id.

Parameters
int$a_block_idBlock ID

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

Referenced by ilNewsForContextBlockGUI\__construct(), ilObjectMetaDataBlockGUI\__construct(), ilPDCalendarBlockGUI\__construct(), ilCalendarBlockGUI\__construct(), ilPollBlockGUI\setBlock(), ilExternalFeedBlockGUI\setBlock(), and ilPDExternalFeedBlockGUI\setBlock().

116  {
117  $this->block_id = $a_block_id;
118  }
+ Here is the caller graph for this function:

◆ setColSpan()

ilBlockGUI::setColSpan (   $a_colspan)

Set Columns Span.

Parameters
int$a_colspanColumns Span

Definition at line 412 of file class.ilBlockGUI.php.

Referenced by ilBookmarkBlockGUI\fillDataSection(), ilForumPostingDraftsBlockGUI\fillDataSection(), ilPDPortfolioBlockGUI\fillDataSection(), ilPDMailBlockGUI\fillDataSection(), ilUsersOnlineBlockGUI\fillDataSection(), and ilCalendarBlockGUI\fillDataSection().

413  {
414  $this->colspan = $a_colspan;
415  }
+ Here is the caller graph for this function:

◆ setCurrentDetailLevel()

ilBlockGUI::setCurrentDetailLevel (   $a_currentdetaillevel)

Set Current Detail Level.

Parameters
int$a_currentdetaillevelCurrent Detail Level

Definition at line 148 of file class.ilBlockGUI.php.

Referenced by ilPDSysMessageBlockGUI\getHTML(), ilUsersOnlineBlockGUI\getListRowData(), and handleDetailLevel().

149  {
150  $this->currentdetaillevel = $a_currentdetaillevel;
151  }
+ Here is the caller graph for this function:

◆ setData()

◆ setDataSection()

◆ setEnableDetailRow()

ilBlockGUI::setEnableDetailRow (   $a_enabledetailrow)

Set EnableDetailRow.

Parameters
boolean$a_enabledetailrowEnableDetailRow

Definition at line 432 of file class.ilBlockGUI.php.

Referenced by ilPDNotesBlockGUI\fillDataSection(), ilBookmarkBlockGUI\fillDataSection(), ilForumPostingDraftsBlockGUI\fillDataSection(), ilPDPortfolioBlockGUI\fillDataSection(), ilPDTaggingBlockGUI\fillDataSection(), ilPDMailBlockGUI\fillDataSection(), ilPDNewsBlockGUI\fillDataSection(), and ilPDSelectedItemsBlockGUI\getHTML().

433  {
434  $this->enabledetailrow = $a_enabledetailrow;
435  }
+ Here is the caller graph for this function:

◆ setEnableEdit()

ilBlockGUI::setEnableEdit (   $a_enableedit)

Set EnableEdit.

Parameters
boolean$a_enableeditEnableEdit

Definition at line 278 of file class.ilBlockGUI.php.

279  {
280  $this->enableedit = $a_enableedit;
281  }

◆ setEnableNumInfo()

◆ setFooterInfo()

ilBlockGUI::setFooterInfo (   $a_footerinfo,
  $a_hide_and_icon = false 
)

Set Footer Info.

Parameters
string$a_footerinfoFooter Info

Definition at line 318 of file class.ilBlockGUI.php.

Referenced by ilClassificationBlockGUI\__construct(), ilPDNewsBlockGUI\getHTML(), and ilNewsForContextBlockGUI\getHTML().

319  {
320  if ($a_hide_and_icon)
321  {
322  $this->footerinfo_icon = $a_footerinfo;
323  }
324  else
325  {
326  $this->footerinfo = $a_footerinfo;
327  }
328  }
+ Here is the caller graph for this function:

◆ setGuiObject()

ilBlockGUI::setGuiObject ( $a_gui_object)

Set GuiObject.

Only used for repository blocks, that are represented as real repository objects (have a ref id and permissions)

Parameters
object$a_gui_objectGUI object

Definition at line 160 of file class.ilBlockGUI.php.

161  {
162  $this->gui_object = $a_gui_object;
163  }

◆ setImage()

ilBlockGUI::setImage (   $a_image)

Set Image.

Parameters
string$a_imageImage

Definition at line 210 of file class.ilBlockGUI.php.

References image.

Referenced by ilPDMailBlockGUI\__construct(), ilBookmarkBlockGUI\__construct(), and ilChatroomBlockGUI\__construct().

211  {
212  $this->image = $a_image;
213  }
Generate an image
+ Here is the caller graph for this function:

◆ setLimit()

◆ setOffset()

ilBlockGUI::setOffset (   $a_offset)

Set Offset.

Parameters
int$a_offsetOffset

Definition at line 230 of file class.ilBlockGUI.php.

Referenced by correctOffset(), and fillDataSection().

231  {
232  $this->offset = $a_offset;
233  }
+ Here is the caller graph for this function:

◆ setPreviousNextLinks()

ilBlockGUI::setPreviousNextLinks ( )

Get previous/next linkbar.

Author
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Returns
array linkbar or false on error

Definition at line 1130 of file class.ilBlockGUI.php.

References $block_id, $ilCtrl, $lng, $text, addFooterLink(), getBlockType(), getLimit(), getNavParameter(), and getOffset().

Referenced by fillPreviousNext().

1131  {
1132  global $ilCtrl, $lng;
1133 
1134  // if more entries then entries per page -> show link bar
1135  if ($this->max_count > $this->getLimit() && ($this->getLimit() != 0))
1136  {
1137  // previous link
1138  if ($this->getOffset() >= 1)
1139  {
1140  $prevoffset = $this->getOffset() - $this->getLimit();
1141 
1142  $ilCtrl->setParameterByClass("ilcolumngui",
1143  $this->getNavParameter(), "::".$prevoffset);
1144 
1145  // ajax link
1146  $ilCtrl->setParameterByClass("ilcolumngui",
1147  "block_id", "block_".$this->getBlockType()."_".$this->block_id);
1148  $block_id = "block_".$this->getBlockType()."_".$this->block_id;
1149  $onclick = $ilCtrl->getLinkTargetByClass("ilcolumngui",
1150  "updateBlock", "", true);
1151  $ilCtrl->setParameterByClass("ilcolumngui",
1152  "block_id", "");
1153 
1154  // normal link
1155  $href = $ilCtrl->getLinkTargetByClass("ilcolumngui", "");
1156  $text = $lng->txt("previous");
1157 
1158  $this->addFooterLink($text, $href, $onclick, $block_id, true);
1159  }
1160 
1161  // calculate number of pages
1162  $pages = intval($this->max_count / $this->getLimit());
1163 
1164  // add a page if a rest remains
1165  if (($this->max_count % $this->getLimit()))
1166  $pages++;
1167 
1168  // show next link (if not last page)
1169  if (! ( ($this->getOffset() / $this->getLimit())==($pages-1) ) && ($pages!=1) )
1170  {
1171  $newoffset = $this->getOffset() + $this->getLimit();
1172 
1173  $ilCtrl->setParameterByClass("ilcolumngui",
1174  $this->getNavParameter(), "::".$newoffset);
1175 
1176  // ajax link
1177  $ilCtrl->setParameterByClass("ilcolumngui",
1178  "block_id", "block_".$this->getBlockType()."_".$this->block_id);
1179  //$this->tpl->setCurrentBlock("pnonclick");
1180  $block_id = "block_".$this->getBlockType()."_".$this->block_id;
1181  $onclick = $ilCtrl->getLinkTargetByClass("ilcolumngui",
1182  "updateBlock", "", true);
1183 //echo "-".$onclick."-";
1184  //$this->tpl->parseCurrentBlock();
1185  $ilCtrl->setParameterByClass("ilcolumngui",
1186  "block_id", "");
1187 
1188  // normal link
1189  $href = $ilCtrl->getLinkTargetByClass("ilcolumngui", "");
1190  $text = $lng->txt("next");
1191 
1192  $this->addFooterLink($text, $href, $onclick, $block_id, true);
1193  }
1194  $ilCtrl->setParameterByClass("ilcolumngui",
1195  $this->getNavParameter(), "");
1196  return true;
1197  }
1198  else
1199  {
1200  return false;
1201  }
1202  }
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.
getLimit()
Get Limit.
global $ilCtrl
Definition: ilias.php:18
static getBlockType()
getOffset()
Get Offset.
global $lng
Definition: privfeed.php:17
$text
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setProperties()

ilBlockGUI::setProperties (   $a_properties)

This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties.

Parameters
string$a_propertiesproperties array (key => value)

Definition at line 474 of file class.ilBlockGUI.php.

475  {
476  $this->property = $a_properties;
477  }

◆ setProperty()

ilBlockGUI::setProperty (   $a_property,
  $a_value 
)

Definition at line 484 of file class.ilBlockGUI.php.

485  {
486  $this->property[$a_property] = $a_value;
487  }

◆ setRefId()

ilBlockGUI::setRefId (   $a_refid)

Set Ref Id (only used if isRepositoryObject() is true).

Parameters
int$a_refidRef Id

Definition at line 372 of file class.ilBlockGUI.php.

373  {
374  $this->refid = $a_refid;
375  }

◆ setRepositoryMode()

ilBlockGUI::setRepositoryMode (   $a_repositorymode)

Set RepositoryMode.

Parameters
boolean$a_repositorymodeRepositoryMode

Definition at line 298 of file class.ilBlockGUI.php.

299  {
300  $this->repositorymode = $a_repositorymode;
301  }

◆ setRowTemplate()

ilBlockGUI::setRowTemplate (   $a_rowtemplatename,
  $a_rowtemplatedir = "" 
)

Set Row Template Name.

Parameters
string$a_rowtemplatenameRow Template Name

Definition at line 494 of file class.ilBlockGUI.php.

Referenced by ilPDNewsBlockGUI\__construct(), ilNewsForContextBlockGUI\__construct(), ilExternalFeedBlockGUI\__construct(), ilPollBlockGUI\__construct(), ilPDExternalFeedBlockGUI\__construct(), ilPDNotesBlockGUI\fillDataSection(), ilBookmarkBlockGUI\fillDataSection(), ilForumPostingDraftsBlockGUI\fillDataSection(), ilPDPortfolioBlockGUI\fillDataSection(), ilPDMailBlockGUI\fillDataSection(), ilUsersOnlineBlockGUI\fillDataSection(), and ilCalendarBlockGUI\fillDataSection().

495  {
496  $this->rowtemplatename = $a_rowtemplatename;
497  $this->rowtemplatedir = $a_rowtemplatedir;
498  }
+ Here is the caller graph for this function:

◆ setSubtitle()

ilBlockGUI::setSubtitle (   $a_subtitle)

Set Subtitle.

Parameters
string$a_subtitleSubtitle

Definition at line 352 of file class.ilBlockGUI.php.

353  {
354  $this->subtitle = $a_subtitle;
355  }

◆ setTitle()

Field Documentation

◆ $allow_moving

ilBlockGUI::$allow_moving = true
protected

Definition at line 27 of file class.ilBlockGUI.php.

◆ $bigmode

ilBlockGUI::$bigmode = false
protected

Definition at line 23 of file class.ilBlockGUI.php.

Referenced by getBigMode().

◆ $block_commands

ilBlockGUI::$block_commands = array()
protected

Definition at line 33 of file class.ilBlockGUI.php.

Referenced by getBlockCommands().

◆ $block_id

◆ $close_command

ilBlockGUI::$close_command = false
protected

Definition at line 35 of file class.ilBlockGUI.php.

Referenced by fillHeaderCommands().

◆ $colspan

ilBlockGUI::$colspan = 1
protected

Definition at line 19 of file class.ilBlockGUI.php.

Referenced by getColSpan().

◆ $css_row

ilBlockGUI::$css_row = ""
protected

Definition at line 39 of file class.ilBlockGUI.php.

◆ $data

◆ $detail_max

ilBlockGUI::$detail_max = 0
protected

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

◆ $detail_min

ilBlockGUI::$detail_min = 0
protected

Definition at line 21 of file class.ilBlockGUI.php.

Referenced by fillDetailRow().

◆ $dropdown

ilBlockGUI::$dropdown
protected

Definition at line 41 of file class.ilBlockGUI.php.

Referenced by fillHeaderCommands().

◆ $enabledetailrow

ilBlockGUI::$enabledetailrow = true
protected

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

Referenced by getEnableDetailRow().

◆ $enablenuminfo

ilBlockGUI::$enablenuminfo = true
protected

Definition at line 20 of file class.ilBlockGUI.php.

Referenced by getEnableNumInfo().

◆ $footer_links

ilBlockGUI::$footer_links = array()
protected

Definition at line 24 of file class.ilBlockGUI.php.

Referenced by getFooterLinks().

◆ $footerinfo

ilBlockGUI::$footerinfo = false
protected

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

Referenced by getFooterInfo().

◆ $footerinfo_icon

ilBlockGUI::$footerinfo_icon = false
protected

Definition at line 32 of file class.ilBlockGUI.php.

Referenced by getFooterInfo().

◆ $header_commands

ilBlockGUI::$header_commands = array()
protected

Definition at line 26 of file class.ilBlockGUI.php.

Referenced by getHeaderCommands().

◆ $header_links

ilBlockGUI::$header_links = array()
protected

Definition at line 30 of file class.ilBlockGUI.php.

Referenced by getHeaderLinks().

◆ $image

ilBlockGUI::$image = false
protected

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

Referenced by getImage().

◆ $max_count

ilBlockGUI::$max_count = false
protected

Definition at line 34 of file class.ilBlockGUI.php.

Referenced by fillPreviousNext().

◆ $move

ilBlockGUI::$move = array("left" => false, "right" => false, "up" => false, "down" => false)
protected

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

◆ $nav_value

ilBlockGUI::$nav_value = ""
protected

Definition at line 38 of file class.ilBlockGUI.php.

Referenced by fillDataSection().

◆ $property

ilBlockGUI::$property = false
protected

Definition at line 37 of file class.ilBlockGUI.php.


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