ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPCTableGUI Class Reference

Class ilPCTableGUI. More...

+ Inheritance diagram for ilPCTableGUI:
+ Collaboration diagram for ilPCTableGUI:

Public Member Functions

 __construct (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor @access public. More...
 
 setBasicTableCellStyles ()
 Set basic table cell styles. More...
 
 executeCommand ()
 execute command More...
 
 setTabs ()
 Set tabs. More...
 
 setCellPropertiesSubTabs ()
 Set tabs. More...
 
 getTemplateOptions ($a_type="")
 Get table templates. More...
 
 edit ()
 edit properties form More...
 
 initPropertiesForm ($a_mode="edit")
 Init properties form. More...
 
 getPropertiesFormValues ()
 Get properties form. More...
 
 renderTable ($a_mode="table_edit", $a_submode="")
 Render the table. More...
 
 editCellStyle ()
 Edit cell styles. More...
 
 editCellWidth ()
 Edit cell widths. More...
 
 editCellSpan ()
 Edit cell spans. More...
 
 setStyles ()
 Set cell styles and. More...
 
 setWidths ()
 Set cell widths. More...
 
 setSpans ()
 Set cell spans. More...
 
 setProperties ()
 Set properties from input form. More...
 
 saveProperties ()
 save table properties in db and return to page edit screen More...
 
 rightAlign ()
 align table to right More...
 
 leftAlign ()
 align table to left More...
 
 centerAlign ()
 align table to left More...
 
 leftFloatAlign ()
 align table to left float More...
 
 rightFloatAlign ()
 align table to left More...
 
 insert ()
 insert new table form More...
 
 getNewTableObject ()
 Get new table object. More...
 
 create ()
 create new table in dom and update page in db More...
 
 afterCreation ()
 After creation processing. More...
 
 editCellAlignment ()
 Edit cell styles. More...
 
 setAlignment ()
 Set cell alignments. More...
 
- Public Member Functions inherited from ilPageContentGUI
 __construct ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor @access public. More...
 
 setContentObject ($a_val)
 Set content object. More...
 
 getContentObject ()
 Get content object. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 setPageConfig ($a_val)
 Set Page Config. More...
 
 getPageConfig ()
 Get Page Config. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 getStyle ()
 Get style object. More...
 
 setCharacteristics ($a_chars)
 Set Characteristics. More...
 
 getCharacteristics ()
 Get characteristics. More...
 
 getHierId ()
 get hierarchical id in dom object More...
 
 setHierId ($a_hier_id)
 get hierarchical id in dom object More...
 
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl. More...
 
 delete ()
 delete content element More...
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 display validation errors More...
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions ($a_type)
 Get table templates. More...
 

Static Public Member Functions

static _renderTable ($content, $a_mode="table_edit", $a_submode="", $a_table_obj=null, $unmask=true)
 Static render table function. More...
 
static _addStyleCheckboxes ($a_output, $a_table)
 Add style checkboxes in edit mode. More...
 
static _addAlignmentCheckboxes ($a_output, $a_table)
 Add alignment checkboxes in edit mode. More...
 
static _addWidthInputs ($a_output, $a_table)
 Add width inputs. More...
 
static _addSpanInputs ($a_output, $a_table)
 Add span inputs. More...
 
- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 

Protected Attributes

 $tabs
 
 $user
 
- Protected Attributes inherited from ilPageContentGUI
 $error
 
 $log
 

Additional Inherited Members

- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons
 

Detailed Description

Class ilPCTableGUI.

User Interface for Table Editing

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

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

Constructor & Destructor Documentation

◆ __construct()

ilPCTableGUI::__construct ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor @access public.

Reimplemented in ilPCDataTableGUI.

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

35 {
36 global $DIC;
37
38 $this->tabs = $DIC->tabs();
39 $this->ctrl = $DIC->ctrl();
40 $this->lng = $DIC->language();
41 $this->tpl = $DIC["tpl"];
42 $this->user = $DIC->user();
43 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
44 $this->setCharacteristics(array("StandardTable" => $this->lng->txt("cont_StandardTable")));
45 }
user()
Definition: user.php:4
setCharacteristics($a_chars)
Set Characteristics.
global $DIC
Definition: saml.php:7

References $DIC, ilPageContentGUI\setCharacteristics(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _addAlignmentCheckboxes()

static ilPCTableGUI::_addAlignmentCheckboxes (   $a_output,
  $a_table 
)
static

Add alignment checkboxes in edit mode.

Definition at line 532 of file class.ilPCTableGUI.php.

533 {
534 global $DIC;
535
536 $lng = $DIC->language();
537
538 $classes = $a_table->getAllCellAlignments();
539
540 foreach ($classes as $k => $v) {
541 if ($v == "") {
542 $v = $lng->txt("default");
543 }
544 $check = $lng->txt("cont_alignment") . ": " .
545 '<input type="checkbox" value="1"' .
546 ' name="target[' . $k . ']">' . '</input> ' . $v;
547
548 $a_output = str_replace("{{{{{TableEdit;" . $k . "}}}}}", $check, $a_output);
549 }
550 return $a_output;
551 }

References $DIC, and ilPageContentGUI\$lng.

Referenced by _renderTable().

+ Here is the caller graph for this function:

◆ _addSpanInputs()

static ilPCTableGUI::_addSpanInputs (   $a_output,
  $a_table 
)
static

Add span inputs.

Definition at line 577 of file class.ilPCTableGUI.php.

578 {
579 global $DIC;
580
581 $lng = $DIC->language();
582
583 $spans = $a_table->getAllCellSpans();
584
585 foreach ($spans as $k => $v) {
586 // colspans
587 $selects = '<div style="white-space:nowrap;">' . $lng->txt("cont_colspan") . ": " .
588 '<select class="small" name="colspan[' . $k . ']">';
589 for ($i = 1; $i <= $v["max_x"] - $v["x"] + 1; $i++) {
590 $sel_str = ($i == $v["colspan"])
591 ? 'selected="selected"'
592 : '';
593 $selects.= '<option value="' . $i . '" ' . $sel_str . '>' . $i . '</option>';
594 }
595 $selects.= "</select></div>";
596
597 // rowspans
598 $selects.= '<div style="margin-top:3px; white-space:nowrap;">' . $lng->txt("cont_rowspan") . ": " .
599 '<select class="small" name="rowspan[' . $k . ']">';
600 for ($i = 1; $i <= $v["max_y"] - $v["y"] + 1; $i++) {
601 $sel_str = ($i == $v["rowspan"])
602 ? 'selected="selected"'
603 : '';
604 $selects.= '<option value="' . $i . '" ' . $sel_str . '>' . $i . '</option>';
605 }
606 $selects.= "</select></div>";
607
608 $a_output = str_replace("{{{{{TableEdit;" . $k . "}}}}}", $selects, $a_output);
609 }
610 return $a_output;
611 }
$i
Definition: disco.tpl.php:19

References $DIC, $i, and ilPageContentGUI\$lng.

Referenced by _renderTable().

+ Here is the caller graph for this function:

◆ _addStyleCheckboxes()

static ilPCTableGUI::_addStyleCheckboxes (   $a_output,
  $a_table 
)
static

Add style checkboxes in edit mode.

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

506 {
507 global $DIC;
508
509 $lng = $DIC->language();
510
511 $classes = $a_table->getAllCellClasses();
512
513 foreach ($classes as $k => $v) {
514 if ($v == "") {
515 $v = $lng->txt("none");
516 }
517 if (substr($v, 0, 4) == "ilc_") {
518 $v = substr($v, 4);
519 }
520 $check = $lng->txt("cont_style") . ": " .
521 '<input type="checkbox" value="1"' .
522 ' name="target[' . $k . ']">' . '</input> ' . $v;
523
524 $a_output = str_replace("{{{{{TableEdit;" . $k . "}}}}}", $check, $a_output);
525 }
526 return $a_output;
527 }

References $DIC, and ilPageContentGUI\$lng.

Referenced by _renderTable().

+ Here is the caller graph for this function:

◆ _addWidthInputs()

static ilPCTableGUI::_addWidthInputs (   $a_output,
  $a_table 
)
static

Add width inputs.

Definition at line 556 of file class.ilPCTableGUI.php.

557 {
558 global $DIC;
559
560 $lng = $DIC->language();
561
562 $widths = $a_table->getAllCellWidths();
563
564 foreach ($widths as $k => $v) {
565 $check = $lng->txt("cont_width") . ": " .
566 '<input class="small" type="text" size="5" maxlength="10"' .
567 ' name="width[' . $k . ']" value="' . $v . '">' . '</input>';
568
569 $a_output = str_replace("{{{{{TableEdit;" . $k . "}}}}}", $check, $a_output);
570 }
571 return $a_output;
572 }

References $DIC, and ilPageContentGUI\$lng.

Referenced by _renderTable().

+ Here is the caller graph for this function:

◆ _renderTable()

static ilPCTableGUI::_renderTable (   $content,
  $a_mode = "table_edit",
  $a_submode = "",
  $a_table_obj = null,
  $unmask = true 
)
static

Static render table function.

Definition at line 447 of file class.ilPCTableGUI.php.

449 {
450 global $DIC;
451
452 $ilUser = $DIC->user();
453
454 $content = "<dummy>" . $content . "</dummy>";
455
456 $xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
457 $args = array( '/_xml' => $content, '/_xsl' => $xsl );
458 $xh = xslt_create();
459 //echo "<b>XML</b>:".htmlentities($content).":<br>";
460 //echo "<b>XSLT</b>:".htmlentities($xsl).":<br>";
461 $wb_path = ilUtil::getWebspaceDir("output");
462 $enlarge_path = ilUtil::getImagePath("enlarge.svg");
463 $params = array('mode' => $a_mode,
464 'media_mode' => $ilUser->getPref("ilPageEditor_MediaMode"),
465 'media_mode' => 'disable',
466 'webspace_path' => $wb_path, 'enlarge_path' => $enlarge_path);
467 $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", null, $args, $params);
468 echo xslt_error($xh);
469 xslt_free($xh);
470
471 // unmask user html
472 if ($unmask) {
473 $output = str_replace("&lt;", "<", $output);
474 $output = str_replace("&gt;", ">", $output);
475 $output = str_replace("&amp;", "&", $output);
476 }
477
478 if ($a_mode == "table_edit" && !is_null($a_table_obj)) {
479 switch ($a_submode) {
480 case "style":
482 break;
483
484 case "alignment":
486 break;
487
488 case "width":
490 break;
491
492 case "span":
494 break;
495 }
496 }
497
498
499 return '<div class="ilFloatLeft">' . $output . '</div>';
500 }
static _addAlignmentCheckboxes($a_output, $a_table)
Add alignment checkboxes in edit mode.
static _addWidthInputs($a_output, $a_table)
Add width inputs.
static _addStyleCheckboxes($a_output, $a_table)
Add style checkboxes in edit mode.
static _addSpanInputs($a_output, $a_table)
Add span inputs.
static getWebspaceDir($mode="filesystem")
get webspace directory
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
xslt_error(&$proc)
xslt_free(&$proc)
xslt_create()
$ilUser
Definition: imgupload.php:18
$params
Definition: disable.php:11

References $DIC, $ilUser, $output, $params, _addAlignmentCheckboxes(), _addSpanInputs(), _addStyleCheckboxes(), _addWidthInputs(), ilUtil\getImagePath(), ilUtil\getWebspaceDir(), xslt_create(), xslt_error(), and xslt_free().

Referenced by ilObjStyleSheetGUI\_getTemplatePreview(), and renderTable().

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

◆ afterCreation()

ilPCTableGUI::afterCreation ( )

After creation processing.

Reimplemented in ilPCDataTableGUI.

Definition at line 958 of file class.ilPCTableGUI.php.

959 {
960 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
961 }

Referenced by create().

+ Here is the caller graph for this function:

◆ centerAlign()

ilPCTableGUI::centerAlign ( )

align table to left

Definition at line 853 of file class.ilPCTableGUI.php.

854 {
855 $this->content_obj->setHorizontalAlign("Center");
856 $_SESSION["il_pg_error"] = $this->pg_obj->update();
857 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
858 }
$_SESSION["AccountId"]

References $_SESSION.

◆ create()

ilPCTableGUI::create ( )

create new table in dom and update page in db

Definition at line 908 of file class.ilPCTableGUI.php.

909 {
910 global $lng;
911
912 $this->content_obj = $this->getNewTableObject();
913 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
914 $import_table = trim($_POST["import_table"]);
915
916 // import xhtml or spreadsheet table
917 if (!empty($import_table)) {
918 switch ($_POST["import_type"]) {
919 // xhtml import
920 case "html":
921 if (!$this->content_obj->importHtml($_POST["language"], $import_table)) {
922 $this->insert();
923 return;
924 }
925 break;
926
927 // spreadsheet
928 case "spreadsheet":
929 $this->content_obj->importSpreadsheet($_POST["language"], $import_table);
930 break;
931 }
932 } else {
933 $this->content_obj->addRows(
934 ilUtil::stripSlashes($_POST["nr_rows"]),
935 ilUtil::stripSlashes($_POST["nr_cols"])
936 );
937 }
938
939 $this->setProperties();
940
941 $frtype = ilUtil::stripSlashes($_POST["first_row_style"]);
942 if ($frtype != "") {
943 $this->content_obj->setFirstRowStyle($frtype);
944 }
945
946 $this->updated = $this->pg_obj->update();
947
948 if ($this->updated === true) {
949 $this->afterCreation();
950 } else {
951 $this->insert();
952 }
953 }
$_POST["username"]
setProperties()
Set properties from input form.
insert()
insert new table form
afterCreation()
After creation processing.
getNewTableObject()
Get new table object.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilPageContentGUI\$lng, afterCreation(), getNewTableObject(), insert(), setProperties(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ edit()

ilPCTableGUI::edit ( )

edit properties form

Definition at line 157 of file class.ilPCTableGUI.php.

158 {
162
163 $this->displayValidationError();
164 $this->setTabs();
165
166 $this->initPropertiesForm();
168 $html = $this->form->getHTML();
169 $html.= "<br />" . $this->renderTable("");
170 $tpl->setContent($html);
171 }
setTabs()
Set tabs.
renderTable($a_mode="table_edit", $a_submode="")
Render the table.
initPropertiesForm($a_mode="edit")
Init properties form.
getPropertiesFormValues()
Get properties form.
displayValidationError()
display validation errors
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), getPropertiesFormValues(), initPropertiesForm(), renderTable(), and setTabs().

Referenced by saveProperties().

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

◆ editCellAlignment()

ilPCTableGUI::editCellAlignment ( )

Edit cell styles.

Definition at line 971 of file class.ilPCTableGUI.php.

972 {
976 $ilTabs = $this->tabs;
977
978 $this->displayValidationError();
979 $this->setTabs();
981 $ilTabs->setSubTabActive("cont_alignment");
982 $ilTabs->setTabActive("cont_table_cell_properties");
983
984 // edit form
985 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
986 $form = new ilPropertyFormGUI();
987 $form->setFormAction($ilCtrl->getFormAction($this));
988 $form->setTitle($this->lng->txt("cont_table_cell_properties"));
989
990 // alignment
991 $options = array(
992 "" => $lng->txt("default"),
993 "Left" => $lng->txt("cont_left"),
994 "Center" => $lng->txt("cont_center"),
995 "Right" => $lng->txt("cont_right")
996 );
997 $si = new ilSelectInputGUI($lng->txt("cont_alignment"), "alignment");
998 $si->setOptions($options);
999 $si->setInfo($lng->txt(""));
1000 $form->addItem($si);
1001
1002 $form->setKeepOpen(true);
1003
1004 $form->addCommandButton("setAlignment", $lng->txt("cont_set_alignment"));
1005
1006 $html = $form->getHTML();
1007 $html.= "<br />" . $this->renderTable("table_edit", "alignment") . "</form>";
1008 $tpl->setContent($html);
1009 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
setCellPropertiesSubTabs()
Set tabs.
This class represents a property form user interface.
This class represents a selection list property in a property form.
if(isset($_POST['submit'])) $form

References ilPageContentGUI\$ctrl, $form, $html, $ilCtrl, ilPageContentGUI\$lng, $options, $si, $tabs, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), renderTable(), setCellPropertiesSubTabs(), and setTabs().

+ Here is the call graph for this function:

◆ editCellSpan()

ilPCTableGUI::editCellSpan ( )

Edit cell spans.

Definition at line 691 of file class.ilPCTableGUI.php.

692 {
696 $ilTabs = $this->tabs;
697
698 $this->displayValidationError();
699 $this->setTabs();
701 $ilTabs->setSubTabActive("cont_span");
702 $ilTabs->setTabActive("cont_table_cell_properties");
703
704 $ctpl = new ilTemplate("tpl.table_cell_properties.html", true, true, "Services/COPage");
705 $ctpl->setVariable("BTN_NAME", "setSpans");
706 $ctpl->setVariable("BTN_TEXT", $lng->txt("cont_save_spans"));
707 $ctpl->setVariable("FORMACTION", $ilCtrl->getFormAction($this));
708
709 $html = $ctpl->get();
710 $html.= "<br />" . $this->renderTable("table_edit", "span") . "</form>";
711 $tpl->setContent($html);
712 }
special template class to simplify handling of ITX/PEAR

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, $tabs, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), renderTable(), setCellPropertiesSubTabs(), and setTabs().

+ Here is the call graph for this function:

◆ editCellStyle()

ilPCTableGUI::editCellStyle ( )

Edit cell styles.

Definition at line 616 of file class.ilPCTableGUI.php.

617 {
621 $ilTabs = $this->tabs;
622
623 $this->displayValidationError();
624 $this->setTabs();
626 $ilTabs->setSubTabActive("cont_style");
627
628 // edit form
629 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
630 $form = new ilPropertyFormGUI();
631 $form->setFormAction($ilCtrl->getFormAction($this));
632 $form->setTitle($this->lng->txt("cont_table_cell_properties"));
633
634 // first row style
635 require_once("./Services/Form/classes/class.ilAdvSelectInputGUI.php");
637 $this->lng->txt("cont_style"),
638 "style"
639 );
641 $this->getCharacteristicsOfCurrentStyle("table_cell"); // scorm-2004
642 $chars = $this->getCharacteristics(); // scorm-2004
643 $options = array_merge(array("" => $this->lng->txt("none")), $chars); // scorm-2004
644 foreach ($options as $k => $option) {
645 $html = '<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k . '">' .
646 $option . '</td></tr></table>';
647 $style->addOption($k, $option, $html);
648 }
649
650 $style->setValue("");
651 $style->setInfo($lng->txt("cont_set_tab_style_info"));
652 $form->addItem($style);
653 $form->setKeepOpen(true);
654
655 $form->addCommandButton("setStyles", $lng->txt("cont_set_styles"));
656
657 $html = $form->getHTML();
658 $html.= "<br />" . $this->renderTable("table_edit", "style") . "</form>";
659 $tpl->setContent($html);
660 }
This class represents an advanced selection list property in a property form.
setBasicTableCellStyles()
Set basic table cell styles.
getCharacteristicsOfCurrentStyle($a_type)
Get characteristics of current style.
getCharacteristics()
Get characteristics.
$style
Definition: example_012.php:70

References ilPageContentGUI\$ctrl, $form, $html, $ilCtrl, ilPageContentGUI\$lng, $options, $style, $tabs, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), ilPageContentGUI\getCharacteristics(), ilPageContentGUI\getCharacteristicsOfCurrentStyle(), renderTable(), setBasicTableCellStyles(), setCellPropertiesSubTabs(), and setTabs().

+ Here is the call graph for this function:

◆ editCellWidth()

ilPCTableGUI::editCellWidth ( )

Edit cell widths.

Definition at line 665 of file class.ilPCTableGUI.php.

666 {
670 $ilTabs = $this->tabs;
671
672 $this->displayValidationError();
673 $this->setTabs();
675 $ilTabs->setSubTabActive("cont_width");
676 $ilTabs->setTabActive("cont_table_cell_properties");
677
678 $ctpl = new ilTemplate("tpl.table_cell_properties.html", true, true, "Services/COPage");
679 $ctpl->setVariable("BTN_NAME", "setWidths");
680 $ctpl->setVariable("BTN_TEXT", $lng->txt("cont_save_widths"));
681 $ctpl->setVariable("FORMACTION", $ilCtrl->getFormAction($this));
682
683 $html = $ctpl->get();
684 $html.= "<br />" . $this->renderTable("table_edit", "width") . "</form>";
685 $tpl->setContent($html);
686 }

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, $tabs, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), renderTable(), setCellPropertiesSubTabs(), and setTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilPCTableGUI::executeCommand ( )

execute command

Reimplemented in ilPCDataTableGUI.

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

60 {
61 $this->getCharacteristicsOfCurrentStyle("table"); // scorm-2004
62
63 // get next class that processes or forwards current command
64 $next_class = $this->ctrl->getNextClass($this);
65
66 // get current command
67 $cmd = $this->ctrl->getCmd();
68
69 switch ($next_class) {
70 default:
71 $ret = $this->$cmd();
72 break;
73 }
74
75 return $ret;
76 }
$ret
Definition: parser.php:6

References $ret, and ilPageContentGUI\getCharacteristicsOfCurrentStyle().

+ Here is the call graph for this function:

◆ getNewTableObject()

ilPCTableGUI::getNewTableObject ( )

Get new table object.

Reimplemented in ilPCDataTableGUI.

Definition at line 900 of file class.ilPCTableGUI.php.

901 {
902 return new ilPCTable($this->getPage());
903 }
Class ilPCTable.

References ilPageContentGUI\getPage().

Referenced by create().

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

◆ getPropertiesFormValues()

ilPCTableGUI::getPropertiesFormValues ( )

Get properties form.

Definition at line 390 of file class.ilPCTableGUI.php.

391 {
392 $values = array();
393 $values["width"] = $this->content_obj->getWidth();
394 $values["border"] = $this->content_obj->getBorder();
395 $values["padding"] = $this->content_obj->getCellPadding();
396 $values["spacing"] = $this->content_obj->getCellSpacing();
397 $values["row_header"] = $this->content_obj->getHeaderRows();
398 $values["row_footer"] = $this->content_obj->getFooterRows();
399 $values["col_header"] = $this->content_obj->getHeaderCols();
400 $values["col_footer"] = $this->content_obj->getFooterCols();
401 if ($this->content_obj->getTemplate() != "") {
402 $values["characteristic"] = "t:" .
403 ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
404 $this->content_obj->getTemplate();
405 } else {
406 $values["characteristic"] = $this->content_obj->getClass();
407 }
408 $values["align"] = $this->content_obj->getHorizontalAlign();
409 $values["caption"] = $this->content_obj->getCaption();
410 $values["cap_align"] = $this->content_obj->getCaptionAlign();
411 $values["language"] = $this->content_obj->getLanguage();
412
413 $this->form->setValuesByArray($values);
414
415 $ca = $this->form->getItemByPostVar("cap_align");
416 $ca->setValue($this->content_obj->getCaptionAlign());
417 }
static _lookupTemplateIdByName($a_style_id, $a_name)
Lookup table template preview.

References ilObjStyleSheet\_lookupTemplateIdByName(), and ilPageContentGUI\getStyleId().

Referenced by edit().

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

◆ getTemplateOptions()

ilPCTableGUI::getTemplateOptions (   $a_type = "")

Get table templates.

Reimplemented from ilPageContentGUI.

Definition at line 149 of file class.ilPCTableGUI.php.

150 {
151 return parent::getTemplateOptions("table");
152 }

Referenced by initPropertiesForm().

+ Here is the caller graph for this function:

◆ initPropertiesForm()

ilPCTableGUI::initPropertiesForm (   $a_mode = "edit")

Init properties form.

Definition at line 176 of file class.ilPCTableGUI.php.

177 {
182
183 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
184 $this->form = new ilPropertyFormGUI();
185 $this->form->setFormAction($ilCtrl->getFormAction($this));
186 if ($a_mode == "create") {
187 $this->form->setTitle($this->lng->txt("cont_insert_table"));
188 } else {
189 $this->form->setTitle($this->lng->txt("cont_table_properties"));
190 }
191
192 if ($a_mode == "create") {
193 $nr = array();
194 for ($i=1; $i<=20; $i++) {
195 $nr[$i] = $i;
196 }
197
198 // cols
199 $cols = new ilSelectInputGUI($this->lng->txt("cont_nr_cols"), "nr_cols");
200 $cols->setOptions($nr);
201 $cols->setValue(2);
202 $this->form->addItem($cols);
203
204 // rows
205 $rows = new ilSelectInputGUI($this->lng->txt("cont_nr_rows"), "nr_rows");
206 $rows->setOptions($nr);
207 $rows->setValue(2);
208 $this->form->addItem($rows);
209 }
210
211 // width
212 $width = new ilTextInputGUI($this->lng->txt("cont_table_width"), "width");
213 $width->setSize(6);
214 $width->setMaxLength(6);
215 $this->form->addItem($width);
216
217 // border
218 $border = new ilTextInputGUI($this->lng->txt("cont_table_border"), "border");
219 $border->setInfo($this->lng->txt("cont_table_border_info"));
220 $border->setValue("1px");
221 $border->setSize(6);
222 $border->setMaxLength(6);
223 $this->form->addItem($border);
224
225 // padding
226 $padding = new ilTextInputGUI($this->lng->txt("cont_table_cellpadding"), "padding");
227 $padding->setInfo($this->lng->txt("cont_table_cellpadding_info"));
228 $padding->setValue("2px");
229 $padding->setSize(6);
230 $padding->setMaxLength(6);
231 $this->form->addItem($padding);
232
233 // spacing (deprecated, only hidden)
234 $spacing = new ilHiddenInputGUI("spacing");
235 $spacing->setValue("0px");
236 $this->form->addItem($spacing);
237 /*$spacing = new ilTextInputGUI($this->lng->txt("cont_table_cellspacing"), "spacing");
238 $spacing->setValue("0px");
239 $spacing->setSize(6);
240 $spacing->setMaxLength(6);
241 $this->form->addItem($spacing);*/
242
243 // table templates and table classes
244 require_once("./Services/Form/classes/class.ilAdvSelectInputGUI.php");
245 $char_prop = new ilAdvSelectInputGUI(
246 $this->lng->txt("cont_characteristic"),
247 "characteristic"
248 );
249 $chars = $this->getCharacteristics();
250 $templates = $this->getTemplateOptions();
251 $chars = array_merge($templates, $chars);
252 if (is_object($this->content_obj)) {
253 if ($chars[$a_seleted_value] == "" && ($this->content_obj->getClass() != "")) {
254 $chars = array_merge(
255 array($this->content_obj->getClass() => $this->content_obj->getClass()),
256 $chars
257 );
258 }
259 }
260 foreach ($chars as $k => $char) {
261 if (strpos($k, ":") > 0) {
262 $t = explode(":", $k);
263 $html = $this->style->lookupTemplatePreview($t[1]) . '<div style="clear:both;" class="small">' . $char . "</div>";
264 } else {
265 $html = '<table class="ilc_table_' . $k . '"><tr><td class="small">' .
266 $char . '</td></tr></table>';
267 }
268 $char_prop->addOption($k, $char, $html);
269 }
270 $char_prop->setValue("StandardTable");
271 $this->form->addItem($char_prop);
272
273 $nr = array();
274 for ($i=0; $i<=3; $i++) {
275 $nr[$i] = $i;
276 }
277
278 // row header
279 $rh = new ilSelectInputGUI($this->lng->txt("cont_nr_row_header"), "row_header");
280 $rh->setOptions($nr);
281 $rh->setValue(1);
282 $this->form->addItem($rh);
283
284 // row footer
285 $rf = new ilSelectInputGUI($this->lng->txt("cont_nr_row_footer"), "row_footer");
286 $rf->setOptions($nr);
287 $rf->setValue(0);
288 $this->form->addItem($rf);
289
290 // col header
291 $ch = new ilSelectInputGUI($this->lng->txt("cont_nr_col_header"), "col_header");
292 $ch->setOptions($nr);
293 $ch->setValue(0);
294 $this->form->addItem($ch);
295
296 // col footer
297 $cf = new ilSelectInputGUI($this->lng->txt("cont_nr_col_footer"), "col_footer");
298 $cf->setOptions($nr);
299 $cf->setValue(0);
300 $this->form->addItem($cf);
301
302 if ($a_mode == "create") {
303 // first row style
304 require_once("./Services/Form/classes/class.ilAdvSelectInputGUI.php");
305 $fr_style = new ilAdvSelectInputGUI(
306 $this->lng->txt("cont_first_row_style"),
307 "first_row_style"
308 );
310 $this->getCharacteristicsOfCurrentStyle("table_cell");
311 $chars = $this->getCharacteristics();
312 $options = array_merge(array("" => $this->lng->txt("none")), $chars);
313 foreach ($options as $k => $option) {
314 $html = '<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k . '">' .
315 $option . '</td></tr></table>';
316 $fr_style->addOption($k, $option, $html);
317 }
318
319 $fr_style->setValue("");
320 $this->form->addItem($fr_style);
321 }
322
323 // alignment
324 $align_opts = array("Left" => $lng->txt("cont_left"),
325 "Right" => $lng->txt("cont_right"), "Center" => $lng->txt("cont_center"),
326 "LeftFloat" => $lng->txt("cont_left_float"),
327 "RightFloat" => $lng->txt("cont_right_float"));
328 $align = new ilSelectInputGUI($this->lng->txt("cont_align"), "align");
329 $align->setOptions($align_opts);
330 $align->setValue("Center");
331 $this->form->addItem($align);
332
333 // caption
334 $caption = new ilTextInputGUI($this->lng->txt("cont_caption"), "caption");
335 $caption->setSize(60);
336 $this->form->addItem($caption);
337
338 // caption align
339 $ca_opts = array("top" => $lng->txt("cont_top"),
340 "bottom" => $lng->txt("cont_bottom"));
341 $ca = new ilSelectInputGUI(
342 $this->lng->txt("cont_align"),
343 "cap_align"
344 );
345 $ca->setOptions($ca_opts);
346 $caption->addSubItem($ca);
347
348 // import
349 if ($a_mode == "create") {
350 // import table
351 $import = new ilRadioGroupInputGUI($this->lng->txt("cont_paste_table"), "import_type");
352 $op = new ilRadioOption($this->lng->txt("cont_html_table"), "html");
353 $import->addOption($op);
354 $op2 = new ilRadioOption($this->lng->txt("cont_spreadsheet_table"), "spreadsheet");
355
356 $import_data = new ilTextAreaInputGUI("", "import_table");
357 $import_data->setRows(8);
358 $import_data->setCols(50);
359 $op2->addSubItem($import_data);
360
361 $import->addOption($op2);
362 $import->setValue("html");
363 $this->form->addItem($import);
364 }
365
366 // language
367 if ($_SESSION["il_text_lang_" . $_GET["ref_id"]] != "") {
368 $s_lang = $_SESSION["il_text_lang_" . $_GET["ref_id"]];
369 } else {
370 $s_lang = $ilUser->getLanguage();
371 }
372 require_once("Services/MetaData/classes/class.ilMDLanguageItem.php");
374 $language = new ilSelectInputGUI($this->lng->txt("language"), "language");
375 $language->setOptions($lang);
376 $language->setValue($s_lang);
377 $this->form->addItem($language);
378
379 if ($a_mode == "create") {
380 $this->form->addCommandButton("create_tab", $lng->txt("save"));
381 $this->form->addCommandButton("cancelCreate", $lng->txt("cancel"));
382 } else {
383 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
384 }
385 }
$_GET["client_id"]
This class represents a hidden form property in a property form.
getTemplateOptions($a_type="")
Get table templates.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.
$lang
Definition: consent.php:3
$border
$cols
Definition: xhr_table.php:11
$rows
Definition: xhr_table.php:10

References $_GET, $_SESSION, $border, $cols, ilPageContentGUI\$ctrl, $html, $i, $ilCtrl, $ilUser, $lang, ilPageContentGUI\$lng, $options, $rows, $t, ilPageContentGUI\$tpl, $user, ilMDLanguageItem\_getLanguages(), ilPageContentGUI\getCharacteristics(), ilPageContentGUI\getCharacteristicsOfCurrentStyle(), getTemplateOptions(), and setBasicTableCellStyles().

Referenced by edit(), and insert().

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

◆ insert()

ilPCTableGUI::insert ( )

insert new table form

Definition at line 883 of file class.ilPCTableGUI.php.

884 {
889
890 $this->displayValidationError();
891
892 $this->initPropertiesForm("create");
893 $html = $this->form->getHTML();
894 $tpl->setContent($html);
895 }

References ilPageContentGUI\$ctrl, $html, $ilCtrl, $ilUser, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, $user, ilPageContentGUI\displayValidationError(), and initPropertiesForm().

Referenced by create().

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

◆ leftAlign()

ilPCTableGUI::leftAlign ( )

align table to left

Definition at line 843 of file class.ilPCTableGUI.php.

844 {
845 $this->content_obj->setHorizontalAlign("Left");
846 $_SESSION["il_pg_error"] = $this->pg_obj->update();
847 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
848 }

References $_SESSION.

◆ leftFloatAlign()

ilPCTableGUI::leftFloatAlign ( )

align table to left float

Definition at line 863 of file class.ilPCTableGUI.php.

864 {
865 $this->content_obj->setHorizontalAlign("LeftFloat");
866 $_SESSION["il_pg_error"] = $this->pg_obj->update();
867 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
868 }

References $_SESSION.

◆ renderTable()

ilPCTableGUI::renderTable (   $a_mode = "table_edit",
  $a_submode = "" 
)

Render the table.

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

423 {
424 $tab_node = $this->content_obj->getNode();
425 $tab_node->set_attribute("Enabled", "True");
426 $content = $this->dom->dump_node($tab_node);
427
428 $trans = $this->pg_obj->getLanguageVariablesXML();
429 $mobs = $this->pg_obj->getMultimediaXML();
430 if ($this->getStyleId() > 0) {
431 if (ilObject::_lookupType($this->getStyleId()) == "sty") {
432 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
433 $style = new ilObjStyleSheet($this->getStyleId());
434 $template_xml = $style->getTemplateXML();
435 }
436 }
437
438 $content = $content . $mobs . $trans . $template_xml;
439
440 return ilPCTableGUI::_renderTable($content, $a_mode, $a_submode, $this->content_obj,
441 !$this->pg_obj->getPageConfig()->getPreventHTMLUnmasking());
442 }
Class ilObjStyleSheet.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _renderTable($content, $a_mode="table_edit", $a_submode="", $a_table_obj=null, $unmask=true)
Static render table function.
$mobs

References $mobs, $style, ilObject\_lookupType(), _renderTable(), and ilPageContentGUI\getStyleId().

Referenced by edit(), editCellAlignment(), editCellSpan(), editCellStyle(), and editCellWidth().

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

◆ rightAlign()

ilPCTableGUI::rightAlign ( )

align table to right

Definition at line 833 of file class.ilPCTableGUI.php.

834 {
835 $this->content_obj->setHorizontalAlign("Right");
836 $_SESSION["il_pg_error"] = $this->pg_obj->update();
837 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
838 }

References $_SESSION.

◆ rightFloatAlign()

ilPCTableGUI::rightFloatAlign ( )

align table to left

Definition at line 873 of file class.ilPCTableGUI.php.

874 {
875 $this->content_obj->setHorizontalAlign("RightFloat");
876 $_SESSION["il_pg_error"] = $this->pg_obj->update();
877 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
878 }

References $_SESSION.

◆ saveProperties()

ilPCTableGUI::saveProperties ( )

save table properties in db and return to page edit screen

Definition at line 817 of file class.ilPCTableGUI.php.

818 {
819 $this->setProperties();
820 $this->updated = $this->pg_obj->update();
821 if ($this->updated === true) {
822 $this->ctrl->redirect($this, "edit");
823 //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
824 } else {
825 $this->pg_obj->addHierIDs();
826 $this->edit();
827 }
828 }
edit()
edit properties form

References edit(), and setProperties().

+ Here is the call graph for this function:

◆ setAlignment()

ilPCTableGUI::setAlignment ( )

Set cell alignments.

Definition at line 1014 of file class.ilPCTableGUI.php.

1015 {
1016 $lng = $this->lng;
1017
1018 if (is_array($_POST["target"])) {
1019 foreach ($_POST["target"] as $k => $value) {
1020 if ($value > 0) {
1021 $cid = explode(":", $k);
1022 $this->content_obj->setTDAlignment(
1023 ilUtil::stripSlashes($cid[0]),
1024 ilUtil::stripSlashes($_POST["alignment"]),
1025 ilUtil::stripSlashes($cid[1])
1026 );
1027 }
1028 }
1029 }
1030 $this->updated = $this->pg_obj->update();
1031 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1032
1033 $this->ctrl->redirect($this, "editCellAlignment");
1034 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_POST, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setBasicTableCellStyles()

ilPCTableGUI::setBasicTableCellStyles ( )

Set basic table cell styles.

Definition at line 50 of file class.ilPCTableGUI.php.

51 {
52 $this->setCharacteristics(array("Cell1" => "Cell1", "Cell2" => "Cell2",
53 "Cell3" => "Cell3", "Cell4" => "Cell4"));
54 }

References ilPageContentGUI\setCharacteristics().

Referenced by editCellStyle(), and initPropertiesForm().

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

◆ setCellPropertiesSubTabs()

ilPCTableGUI::setCellPropertiesSubTabs ( )

Set tabs.

Definition at line 111 of file class.ilPCTableGUI.php.

112 {
113 $ilTabs = $this->tabs;
116
117 $ilTabs->addSubTabTarget(
118 "cont_style",
119 $ilCtrl->getLinkTarget($this, "editCellStyle"),
120 "editCellStyle",
121 get_class($this)
122 );
123
124 $ilTabs->addSubTabTarget(
125 "cont_width",
126 $ilCtrl->getLinkTarget($this, "editCellWidth"),
127 "editCellWidth",
128 get_class($this)
129 );
130
131 $ilTabs->addSubTabTarget(
132 "cont_alignment",
133 $ilCtrl->getLinkTarget($this, "editCellAlignment"),
134 "editCellAlignment",
135 get_class($this)
136 );
137
138 $ilTabs->addSubTabTarget(
139 "cont_span",
140 $ilCtrl->getLinkTarget($this, "editCellSpan"),
141 "editCellSpan",
142 get_class($this)
143 );
144 }

References ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, and $tabs.

Referenced by editCellAlignment(), editCellSpan(), editCellStyle(), and editCellWidth().

+ Here is the caller graph for this function:

◆ setProperties()

ilPCTableGUI::setProperties ( )

Set properties from input form.

Definition at line 782 of file class.ilPCTableGUI.php.

783 {
784 // mask html
785 $caption = ilUtil::stripSlashes($_POST["caption"]);
786 $caption = str_replace("&", "&amp;", $caption);
787 $caption = str_replace("<", "&lt;", $caption);
788 $caption = str_replace(">", "&gt;", $caption);
789
790 $this->content_obj->setLanguage(ilUtil::stripSlashes($_POST["language"]));
791 $this->content_obj->setWidth(ilUtil::stripSlashes($_POST["width"]));
792 $this->content_obj->setBorder(ilUtil::stripSlashes($_POST["border"]));
793 $this->content_obj->setCellSpacing(ilUtil::stripSlashes($_POST["spacing"]));
794 $this->content_obj->setCellPadding(ilUtil::stripSlashes($_POST["padding"]));
795 $this->content_obj->setHorizontalAlign(ilUtil::stripSlashes($_POST["align"]));
796 $this->content_obj->setHeaderRows(ilUtil::stripSlashes($_POST["row_header"]));
797 $this->content_obj->setHeaderCols(ilUtil::stripSlashes($_POST["col_header"]));
798 $this->content_obj->setFooterRows(ilUtil::stripSlashes($_POST["row_footer"]));
799 $this->content_obj->setFooterCols(ilUtil::stripSlashes($_POST["col_footer"]));
800 if (strpos($_POST["characteristic"], ":") > 0) {
801 $t = explode(":", $_POST["characteristic"]);
802 $this->content_obj->setTemplate(ilUtil::stripSlashes($t[2]));
803 $this->content_obj->setClass("");
804 } else {
805 $this->content_obj->setClass(ilUtil::stripSlashes($_POST["characteristic"]));
806 $this->content_obj->setTemplate("");
807 }
808 $this->content_obj->setCaption(
809 $caption,
810 ilUtil::stripSlashes($_POST["cap_align"])
811 );
812 }

References $_POST, $t, and ilUtil\stripSlashes().

Referenced by create(), and saveProperties().

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

◆ setSpans()

ilPCTableGUI::setSpans ( )

Set cell spans.

Definition at line 763 of file class.ilPCTableGUI.php.

764 {
766
767 if (is_array($_POST["colspan"])) {
768 foreach ($_POST["colspan"] as $k => $span) {
769 $_POST["colspan"][$k] = ilUtil::stripSlashes($span);
770 $_POST["rowspan"][$k] = ilUtil::stripSlashes($_POST["rowspan"][$k]);
771 }
772 $this->content_obj->setTDSpans($_POST["colspan"], $_POST["rowspan"]);
773 }
774 $this->updated = $this->pg_obj->update();
775 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
776 $this->ctrl->redirect($this, "editCellSpan");
777 }

References $_POST, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setStyles()

ilPCTableGUI::setStyles ( )

Set cell styles and.

Definition at line 717 of file class.ilPCTableGUI.php.

718 {
720
721 if (is_array($_POST["target"])) {
722 foreach ($_POST["target"] as $k => $value) {
723 if ($value > 0) {
724 $cid = explode(":", $k);
725 $this->content_obj->setTDClass(
726 ilUtil::stripSlashes($cid[0]),
728 ilUtil::stripSlashes($cid[1])
729 );
730 }
731 }
732 }
733 $this->updated = $this->pg_obj->update();
734 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
735 $this->ctrl->redirect($this, "editCellStyle");
736 }

References $_POST, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setTabs()

ilPCTableGUI::setTabs ( )

Set tabs.

Reimplemented in ilPCDataTableGUI.

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

83 {
84 $ilTabs = $this->tabs;
87
88 $ilTabs->setBackTarget(
89 $lng->txt("pg"),
90 $this->ctrl->getParentReturn($this)
91 );
92
93 $ilTabs->addTarget(
94 "cont_table_properties",
95 $ilCtrl->getLinkTarget($this, "edit"),
96 "edit",
97 get_class($this)
98 );
99
100 $ilTabs->addTarget(
101 "cont_table_cell_properties",
102 $ilCtrl->getLinkTarget($this, "editCellStyle"),
103 "editCellStyle",
104 get_class($this)
105 );
106 }

References ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, and $tabs.

Referenced by edit(), editCellAlignment(), editCellSpan(), editCellStyle(), and editCellWidth().

+ Here is the caller graph for this function:

◆ setWidths()

ilPCTableGUI::setWidths ( )

Set cell widths.

Definition at line 741 of file class.ilPCTableGUI.php.

742 {
744
745 if (is_array($_POST["width"])) {
746 foreach ($_POST["width"] as $k => $width) {
747 $cid = explode(":", $k);
748 $this->content_obj->setTDWidth(
749 ilUtil::stripSlashes($cid[0]),
750 ilUtil::stripSlashes($width),
751 ilUtil::stripSlashes($cid[1])
752 );
753 }
754 }
755 $this->updated = $this->pg_obj->update();
756 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
757 $this->ctrl->redirect($this, "editCellWidth");
758 }

References $_POST, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

Field Documentation

◆ $tabs

ilPCTableGUI::$tabs
protected

◆ $user

ilPCTableGUI::$user
protected

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

Referenced by initPropertiesForm(), and insert().


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