5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
35 public function __construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
39 $this->ctrl = $DIC->ctrl();
40 $this->lng = $DIC->language();
41 $this->access = $DIC->access();
42 $this->rbacsystem = $DIC->rbac()->system();
44 $lng = $DIC->language();
45 $ilAccess = $DIC->access();
46 $lng = $DIC->language();
49 parent::__construct($a_parent_obj, $a_parent_cmd);
52 $this->style_obj = $a_style_obj;
55 $this->
addColumn($this->lng->txt(
"thumbnail"),
"",
"1");
56 $this->
addColumn($this->lng->txt(
"file"),
"",
"33%");
57 $this->
addColumn($this->lng->txt(
"sty_width_height"),
"",
"33%");
58 $this->
addColumn($this->lng->txt(
"size"),
"",
"33%");
61 $this->
setRowTemplate(
"tpl.style_image_row.html",
"Services/Style/Content");
66 if ($this->parent_obj->checkWrite()) {
81 $this->
setData($this->style_obj->getImages());
93 $thumbfile = $this->style_obj->getThumbnailsDirectory() .
"/" . $a_set[
"entry"];
94 if (is_file($thumbfile)) {
95 $this->tpl->setCurrentBlock(
"thumbnail");
96 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"entry"]);
97 $this->tpl->setVariable(
"IMG_SRC", $thumbfile);
98 $this->tpl->parseCurrentBlock();
100 $image_file = $this->style_obj->getImagesDirectory() .
"/" . $a_set[
"entry"];
101 $image_size = @getimagesize($image_file);
103 if ($image_size[0] > 0 && $image_size[1] > 0) {
104 $this->tpl->setVariable(
106 $image_size[0] .
"px x " . $image_size[1] .
"px" 111 $this->tpl->setVariable(
"VAL_FILENAME", $a_set[
"entry"]);
112 $this->tpl->setVariable(
"VAL_SIZE", $a_set[
"size"]);
113 $this->tpl->setVariable(
"FILE", $a_set[
"entry"]);
getItems()
Get items of current folder.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
addMultiCommand($a_cmd, $a_text)
Add Command button.
fillRow($a_set)
Fill table row.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
TableGUI class for style editor (image list)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
__construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
Constructor.
setEnableHeader($a_enableheader)
Set Enable Header.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setEnableTitle($a_enabletitle)
Set Enable Title.