28    protected $move = array(
"left" => 
false, 
"right" => 
false, 
"up" => 
false, 
"down" => 
false);
 
   87        $this->
user = $DIC->user();
 
   88        $this->ctrl = 
$DIC->ctrl();
 
   89        $this->access = 
$DIC->access();
 
   90        $this->lng = 
$DIC->language();
 
   91        $this->main_tpl = 
$DIC[
"tpl"];
 
   92        $this->obj_def = 
$DIC[
"objDefinition"];
 
   94        include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
 
   96        $this->main_tpl->addJavaScript(
"./Services/Block/js/ilblockcallback.js");
 
  103        $this->header_links[] =
 
  104            array(
'href' => $a_href, 
'text' => $a_text, 
'status' => (
bool) $status);
 
  119        $this->
data = $a_data;
 
  139        $this->bigmode = $a_bigmode;
 
  159        $this->block_id = $a_block_id;
 
  180        $this->detail_min = $a_min;
 
  181        $this->detail_max = $a_max;
 
  192        $this->currentdetaillevel = $a_currentdetaillevel;
 
  204        $this->gui_object = $a_gui_object;
 
  214        return $this->gui_object;
 
  224        return $this->currentdetaillevel;
 
  234        $this->title = $a_title;
 
  254        $this->image = $a_image;
 
  274        $this->offset = $a_offset;
 
  284        return $this->offset;
 
  289        if (!($this->offset < $this->max_count)) {
 
  301        $this->limit = $a_limit;
 
  321        $this->enableedit = $a_enableedit;
 
  331        return $this->enableedit;
 
  341        $this->repositorymode = $a_repositorymode;
 
  351        return $this->repositorymode;
 
  361        if ($a_hide_and_icon) {
 
  362            $this->footerinfo_icon = $a_footerinfo;
 
  364            $this->footerinfo = $a_footerinfo;
 
  375        if ($a_hide_and_icon) {
 
  389        $this->subtitle = $a_subtitle;
 
  399        return $this->subtitle;
 
  409        $this->refid = $a_refid;
 
  429        $this->admincommands = $a_admincommands;
 
  439        return $this->admincommands;
 
  449        $this->colspan = $a_colspan;
 
  469        $this->enabledetailrow = $a_enabledetailrow;
 
  490        $this->enablenuminfo = $a_enablenuminfo;
 
  511        $this->
property = $a_properties;
 
  516        return $this->
property[$a_property];
 
  521        $this->
property[$a_property] = $a_value;
 
  531        $this->rowtemplatename = $a_rowtemplatename;
 
  532        $this->rowtemplatedir = $a_rowtemplatedir;
 
  562        return $this->rowtemplatename;
 
  572        return $this->rowtemplatedir;
 
  586        $a_right_aligned = 
false,
 
  590        return $this->block_commands[] =
 
  591            array(
"href" => $a_href,
 
  592                "text" => $a_text, 
"target" => $a_target, 
"img" => $a_img,
 
  593                "right" => $a_right_aligned, 
"checked" => $a_checked, 
"html" => $a_html);
 
  615            $this->close_command = $a_href;
 
  617            $this->header_commands[] =
 
  618                array(
"href" => $a_href,
 
  642        $a_omit_separator = 
false,
 
  645        $this->footer_links[] = array(
 
  648            "onclick" => $a_onclick,
 
  649            "block_id" => $a_block_id,
 
  651            "omit_separator" => $a_omit_separator,
 
  652            "checked" => $a_checked);
 
  668        $this->footer_links = array();
 
  687        if ($this->detail_max > $this->detail_min) {
 
  688            include_once(
"Services/Block/classes/class.ilBlockSetting.php");
 
  698                    $ilCtrl->redirectByClass(
"ilcolumngui", 
"");
 
  748            if (!$ilAccess->checkAccess(
"read", 
"", $this->getRefId())) {
 
  753        $this->tpl = 
new ilTemplate(
"tpl.block.html", 
true, 
true, 
"Services/Block");
 
  762                $this->tpl->setCurrentBlock(
"block_check");
 
  763                $this->tpl->setVariable(
"BL_REF_ID", $this->
getRefId());
 
  764                $this->tpl->parseCurrentBlock();
 
  767            if ($ilAccess->checkAccess(
"delete", 
"", $this->getRefId())) {
 
  769                    "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . 
$_GET[
"ref_id"] . 
"&cmd=delete" .
 
  770                    "&item_ref_id=" . $this->
getRefId(),
 
  776                    "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . 
$_GET[
"ref_id"] . 
"&cmd=cut" .
 
  777                    "&item_ref_id=" . $this->
getRefId(),
 
  783            if ($ilAccess->checkAccess(
"copy", 
"", $this->getRefId())) {
 
  785                $parent_gui = 
"ilObj" . $objDefinition->getClassName($parent_type) . 
"GUI";
 
  787                $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"source_id", $this->
getRefId());
 
  788                $copy_cmd = 
$ilCtrl->getLinkTargetByClass(
 
  789                    array(
"ilrepositorygui", $parent_gui, 
"ilobjectcopygui"),
 
  790                    "initTargetSelection" 
  803            $this->tpl->setCurrentBlock(
"footer_information");
 
  804            $this->tpl->setVariable(
"FOOTER_INFO", $this->
getFooterInfo());
 
  805            $this->tpl->setVariable(
"FICOLSPAN", $this->
getColSpan());
 
  806            $this->tpl->parseCurrentBlock();
 
  809        $this->dropdown = array();
 
  813            $has_block_command = 
false;
 
  816                if (!$command[
"img"] && !$command[
"html"]) {
 
  817                    $this->dropdown[] = $command;
 
  821                $has_block_command = 
true;
 
  823                if ($command[
"target"] != 
"") {
 
  824                    $this->tpl->setCurrentBlock(
"bc_target");
 
  825                    $this->tpl->setVariable(
"CMD_TARGET", $command[
"target"]);
 
  826                    $this->tpl->parseCurrentBlock();
 
  829                if ($command[
"img"] != 
"") {
 
  830                    $this->tpl->setCurrentBlock(
"bc_image");
 
  831                    $this->tpl->setVariable(
"SRC_BC", $command[
"img"]);
 
  832                    $this->tpl->setVariable(
"ALT_BC", $command[
"text"]);
 
  833                    $this->tpl->parseCurrentBlock();
 
  834                    $this->tpl->setCurrentBlock(
"block_command");
 
  835                } elseif ($command[
"html"] != 
"") {
 
  836                    $this->tpl->setCurrentBlock(
"bc_html");
 
  837                    $this->tpl->setVariable(
"HTML", $command[
"html"]);
 
  838                    $this->tpl->parseCurrentBlock();
 
  839                    $this->tpl->setCurrentBlock(
"block_command");
 
  841                    $this->tpl->setCurrentBlock(
"block_command");
 
  842                    $this->tpl->setVariable(
"CMD_TEXT", $command[
"text"]);
 
  843                    $this->tpl->setVariable(
"BC_CLASS", 
'class="il_ContainerItemCommand"');
 
  846                $this->tpl->setVariable(
"CMD_HREF", $command[
"href"]);
 
  847                $this->tpl->parseCurrentBlock();
 
  850            if ($has_block_command) {
 
  851                $this->tpl->setCurrentBlock(
"block_commands");
 
  852                $this->tpl->setVariable(
"CCOLSPAN", $this->
getColSpan());
 
  853                $this->tpl->parseCurrentBlock();
 
  871                    $this->tpl->setCurrentBlock(
'head_delim');
 
  872                    $this->tpl->touchBlock(
'head_delim');
 
  873                    $this->tpl->parseCurrentBlock();
 
  875                if ($command[
'status'] == 
true) {
 
  876                    $this->tpl->setCurrentBlock(
'head_link');
 
  877                    $this->tpl->setVariable(
'HHREF', $command[
'href']);
 
  878                    $this->tpl->setVariable(
'HLINK', $command[
'text']);
 
  879                    $this->tpl->parseCurrentBlock();
 
  881                    $this->tpl->setCurrentBlock(
'head_text');
 
  882                    $this->tpl->setVariable(
'HTEXT', $command[
'text']);
 
  883                    $this->tpl->parseCurrentBlock();
 
  886                $this->tpl->setCurrentBlock(
'head_item');
 
  887                $this->tpl->parseCurrentBlock();
 
  892            $this->tpl->setCurrentBlock(
'header_links');
 
  893            $this->tpl->parseCurrentBlock();
 
  900        if (is_object(
$ilUser) && 
$ilUser->getPref(
"screen_reader_optimization")) {
 
  908        $this->tpl->setVariable(
"COLSPAN", $this->
getColSpan());
 
  910            $this->tpl->touchBlock(
"hclassb");
 
  912            $this->tpl->touchBlock(
"hclass");
 
  917            echo $this->tpl->getAsynch();
 
  920            return '<div id="' . 
"block_" . $this->
getBlockType() . 
"_" . $this->block_id . 
'">' .
 
  921                $this->tpl->get() . 
'</div>';
 
  936            ($this->detail_max > $this->detail_min && $this->detail_min == 0) ||
 
  937            $this->close_command != 
"") {
 
  939                $this->tpl->setCurrentBlock(
"header_command");
 
  940                $this->tpl->setVariable(
"HREF_HCOMM", $command[
"href"]);
 
  941                $this->tpl->setVariable(
"TXT_HCOMM", $command[
"text"]);
 
  942                $this->tpl->parseCurrentBlock();
 
  946            if (($this->detail_max > $this->detail_min && $this->detail_min == 0 &&
 
  949                $this->close_command != 
"") {
 
  950                $alt = 
$lng->txt(
"hide");
 
  951                if ($this->close_command != 
"") {
 
  959                    $url = 
$ilCtrl->getLinkTargetByClass(
"ilcolumngui", 
"");
 
  967                $this->dropdown[] = array(
"text" => $alt,
 
  972            $this->tpl->setCurrentBlock(
"header_commands");
 
  973            $this->tpl->parseCurrentBlock();
 
  977        include_once 
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
 
  983        foreach ($this->dropdown as $item) {
 
  984            if ($item[
"href"] || $item[
"onclick"]) {
 
  985                if ($item[
"checked"]) {
 
 1002        $this->tpl->setCurrentBlock(
"header_dropdown");
 
 1003        $this->tpl->setVariable(
"ADV_DROPDOWN", 
$dropdown);
 
 1004        $this->tpl->parseCurrentBlock();
 
 1006        $this->tpl->setCurrentBlock(
"hitem");
 
 1007        $this->tpl->parseCurrentBlock();
 
 1020            $this->tpl->setCurrentBlock(
"block_img");
 
 1021            $this->tpl->setVariable(
"IMG_BLOCK", $this->
getImage());
 
 1022            $this->tpl->setVariable(
 
 1024                "block_" . $this->
getBlockType() . 
"_" . $this->block_id
 
 1026            $this->tpl->setVariable(
 
 1028                str_replace(array(
"'",
'"'), 
"", strip_tags(
$lng->txt(
"icon") . 
" " . $this->getTitle()))
 
 1030            $this->tpl->parseCurrentBlock();
 
 1034        $this->tpl->setCurrentBlock(
"header_title");
 
 1035        $this->tpl->setVariable(
 
 1037            "block_" . $this->
getBlockType() . 
"_" . $this->block_id
 
 1039        $this->tpl->setVariable(
 
 1043        $this->tpl->setVariable(
 
 1047        $this->tpl->parseCurrentBlock();
 
 1049        $this->tpl->setCurrentBlock(
"hitem");
 
 1050        $this->tpl->parseCurrentBlock();
 
 1059        $this->tpl->setCurrentBlock(
"data_section");
 
 1061        $this->tpl->parseCurrentBlock();
 
 1062        $this->tpl->setVariable(
"BLOCK_ROW", 
"");
 
 1080        $nav = explode(
":", $this->nav_value);
 
 1081        if (isset($nav[2])) {
 
 1088        $this->tpl->addBlockFile(
 
 1096        $this->max_count = count(
$data);
 
 1102        foreach (
$data as $record) {
 
 1103            $this->tpl->setCurrentBlock(
"block_row");
 
 1106            $this->tpl->setCurrentBlock(
"block_row");
 
 1107            $this->tpl->parseCurrentBlock();
 
 1113        foreach ($a_set as 
$key => $value) {
 
 1114            $this->tpl->setVariable(
"VAL_" . strtoupper(
$key), $value);
 
 1124        $this->css_row = ($this->css_row != 
"ilBlockRow1")
 
 1127        $this->tpl->setVariable($a_placeholder, $this->css_row);
 
 1143            if (
$end > $this->max_count or $this->
getLimit() == 0) {
 
 1147            $numinfo = 
"(" . $start . 
"-" . 
$end . 
" " . strtolower(
$lng->txt(
"of")) . 
" " . $this->max_count . 
")";
 
 1182                    "block_" . $this->
getBlockType() . 
"_" . $this->block_id
 
 1185                $onclick = 
$ilCtrl->getLinkTargetByClass(
 
 1198                $href = 
$ilCtrl->getLinkTargetByClass(
"ilcolumngui", 
"");
 
 1205            $pages = intval($this->max_count / $this->
getLimit());
 
 1208            if (($this->max_count % $this->
getLimit())) {
 
 1226                    "block_" . $this->
getBlockType() . 
"_" . $this->block_id
 
 1230                $onclick = 
$ilCtrl->getLinkTargetByClass(
 
 1245                $href = 
$ilCtrl->getLinkTargetByClass(
"ilcolumngui", 
"");
 
 1271        $prefix = ($a_top) ? 
"top" : 
"foot";
 
 1275        $omit_separator = 
false;
 
 1276        foreach ($flinks as $flink) {
 
 1277            if ($flink[
"top"] != $a_top) {
 
 1282                if ($flink[
"onclick"]) {
 
 1283                    $flink[
"onclick"] = 
"ilBlockJSHandler('" . $flink[
"block_id"] .
 
 1284                        "','" . $flink[
"onclick"] . 
"')";
 
 1286                $this->dropdown[] = $flink;
 
 1292            if (!$first && !$omit_separator) {
 
 1293                $this->tpl->touchBlock($prefix . 
"_delim");
 
 1294                $this->tpl->touchBlock($prefix . 
"_item");
 
 1298            if ($flink[
"onclick"] != 
"") {
 
 1299                $this->tpl->setCurrentBlock($prefix . 
"_onclick");
 
 1300                $this->tpl->setVariable(
 
 1304                $this->tpl->setVariable(
 
 1308                $this->tpl->parseCurrentBlock();
 
 1312            if ($flink[
"href"] != 
"") {
 
 1314                $this->tpl->setCurrentBlock($prefix . 
"_link");
 
 1315                $this->tpl->setVariable(
 
 1319                $this->tpl->setVariable(
"FLINK", $flink[
"text"]);
 
 1320                $this->tpl->parseCurrentBlock();
 
 1321                $this->tpl->touchBlock($prefix . 
"_item");
 
 1323                $this->tpl->setCurrentBlock($prefix . 
"_text");
 
 1324                $this->tpl->setVariable(
"FTEXT", $flink[
"text"]);
 
 1325                $this->tpl->parseCurrentBlock();
 
 1326                $this->tpl->touchBlock($prefix . 
"_item");
 
 1330            $omit_separator = $flink[
"omit_separator"];
 
 1333        if ($a_numinfo != 
"" && $has_link) {
 
 1334            $this->tpl->setVariable(
"NUMINFO", $a_numinfo);
 
 1356        if ($this->enabledetailrow == 
false) {
 
 1360        $start = ($this->detail_min < 1)
 
 1362            : $this->detail_min;
 
 1366            : $this->detail_max;
 
 1368        $settings = array();
 
 1373        if (
$end > $start) {
 
 1374            foreach ($settings as 
$i) {
 
 1375                if ((
$i > $start && 
$i > 1)) {
 
 1387                $onclick = $onclick_id = 
"";
 
 1394                        "block_" . $this->
getBlockType() . 
"_" . $this->block_id
 
 1396                    $onclick = 
$ilCtrl->getLinkTargetByClass(
 
 1413                $url = 
$ilCtrl->getLinkTargetByClass(
"ilcolumngui", 
"");
 
 1416                    $onclick = 
"ilBlockJSHandler('" . $onclick_id . 
"','" . $onclick . 
"')";
 
 1420                $this->dropdown[] = array(
"text" => 
$text,
 
 1423                        "onclick" => $onclick,
 
 1424                        "checked" => $checked);
 
 1430                $this->tpl->setCurrentBlock(
"det_info");
 
 1431                $this->tpl->setVariable(
"INFO_TEXT", $this->
getFooterInfo(
true));
 
 1432                $this->tpl->setVariable(
"ALT_DET_INFO", 
$lng->txt(
"info_short"));
 
 1435                $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setLimit($a_limit)
Set Limit.
getBlockCommands()
Get Block commands.
setImage($a_image)
Set Image.
fillHeaderCommands()
Fill header commands block.
setFooterInfo($a_footerinfo, $a_hide_and_icon=false)
Set Footer Info.
getCurrentDetailLevel()
Get Current Detail Level.
getEnableDetailRow()
Get EnableDetailRow.
getBlockId()
Get Block Id.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
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.
setSubtitle($a_subtitle)
Set Subtitle.
static isRepositoryObject()
setData($a_data)
Set Data.
setRefId($a_refid)
Set Ref Id (only used if isRepositoryObject() is true).
fillDetailRow()
Fill Detail Setting Row.
getRepositoryMode()
Get RepositoryMode.
__construct()
Constructor.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
getAdminCommands()
Get Administration Commmands.
getHeaderCommands()
Get Header Block commands.
addHeaderCommand($a_href, $a_text, $a_as_close=false)
Add Header Block Command.
preloadData(array $data)
Can be overwritten in subclasses.
fillHeaderTitleBlock()
Fill header title block (title and.
fillDataSection()
Standard implementation for row based data.
static getScreenMode()
Get Screen Mode for current command.
getBigMode()
Get Big Mode.
setOffset($a_offset)
Set Offset.
setBigMode($a_bigmode)
Set Big Mode.
getRowTemplateDir()
Get Row Template Directory.
getGuiObject()
Get GuiObject.
fillRowColor($a_placeholder="CSS_ROW")
getFooterLinks()
Get footer links.
getFooterInfo($a_hide_and_icon=false)
Get Footer Info.
addHeaderLink($a_href, $a_text, $status=true)
getRowTemplateName()
Get Row Template Name.
getEnableEdit()
Get EnableEdit.
setEnableEdit($a_enableedit)
Set EnableEdit.
setColSpan($a_colspan)
Set Columns Span.
setTitle($a_title)
Set Title.
setAdminCommands($a_admincommands)
Set Administration Commmands.
setBlockId($a_block_id=0)
Set Block Id.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
addBlockCommand( $a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
getColSpan()
Get Columns Span.
handleDetailLevel()
Handle read/write current detail level.
getEnableNumInfo()
Get Enable Item Number Info.
setCurrentDetailLevel($a_currentdetaillevel)
Set Current Detail Level.
getRefId()
Get Ref Id (only used if isRepositoryObject() is true).
fillPreviousNext()
Fill previous/next row.
setGuiObject(&$a_gui_object)
Set GuiObject.
clearFooterLinks()
Clear footer links.
setProperties($a_properties)
This function is supposed to be used for block type specific properties, that should be inherited thr...
setRepositoryMode($a_repositorymode)
Set RepositoryMode.
getHTML()
Handle config status.
setPreviousNextLinks()
Get previous/next linkbar.
setProperty($a_property, $a_value)
getSubtitle()
Get Subtitle.
static _writeDetailLevel($a_type, $a_value, $a_user=0, $a_block_id=0)
Write detail level to database.
static _lookupDetailLevel($a_type, $a_user=0, $a_block_id=0)
Lookup detail level.
static _lookupType($a_id, $a_reference=false)
lookup object type
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.