Inheritance diagram for ilPCListGUI:
Collaboration diagram for ilPCListGUI:Public Member Functions | |
| ilPCListGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id) | |
| Constructor public. | |
| & | executeCommand () |
| execute command | |
| insert () | |
| insert new list form | |
| create () | |
| create new table in dom and update page in db | |
| edit () | |
| edit properties form | |
| saveProperties () | |
| save table properties in db and return to page edit screen | |
| setTabs () | |
| output tabs | |
| getTabs (&$tabs_gui) | |
| adds tabs to tab gui object | |
Definition at line 37 of file class.ilPCListGUI.php.
| ilPCListGUI::create | ( | ) |
create new table in dom and update page in db
Definition at line 120 of file class.ilPCListGUI.php.
References $_POST, and insert().
{
$this->content_obj = new ilPCList($this->dom);
$this->content_obj->create($this->pg_obj, $this->hier_id);
$this->content_obj->addItems($_POST["nr_items"]);
$this->content_obj->setOrderType($_POST["list_order"]);
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
else
{
$this->insert();
}
}
Here is the call graph for this function:| ilPCListGUI::edit | ( | ) |
edit properties form
Definition at line 140 of file class.ilPCListGUI.php.
References ilPageContentGUI::displayValidationError(), formSelect(), and setTabs().
Referenced by saveProperties().
{
$this->setTabs();
// add paragraph edit template
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.list_properties.html", "content");
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_edit_list_properties"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->displayValidationError();
// content is in utf-8, todo: set globally
//header('Content-type: text/html; charset=UTF-8');
// list
$this->tpl->setVariable("TXT_LIST", $this->lng->txt("cont_list_properties"));
$this->tpl->setVariable("TXT_ORDER", $this->lng->txt("cont_order"));
$order = array("Unordered" => $this->lng->txt("cont_Unordered"),
"Number" => $this->lng->txt("cont_Number"),
"Roman" => $this->lng->txt("cont_Roman"),
"roman" => $this->lng->txt("cont_roman"),
"Alphabetic" => $this->lng->txt("cont_Alphabetic"),
"alphabetic" => $this->lng->txt("cont_alphabetic"));
$select_order = ilUtil::formSelect ("","list_order",$order,false,true);
$this->tpl->setVariable("SELECT_ORDER", $select_order);
// operations
$this->tpl->setCurrentBlock("commands");
$this->tpl->setVariable("BTN_NAME", "saveProperties");
$this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
$this->tpl->setVariable("BTN_CANCEL", "cancelUpdate");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| & ilPCListGUI::executeCommand | ( | ) |
| ilPCListGUI::getTabs | ( | &$ | tabs_gui | ) |
adds tabs to tab gui object
| object | $tabs_gui ilTabsGUI object |
Definition at line 213 of file class.ilPCListGUI.php.
Referenced by setTabs().
{
// back to upper context
/*
$tabs_gui->addTarget("cont_back",
$this->ctrl->getParentReturn($this), "",
"");
*/
}
Here is the caller graph for this function:| ilPCListGUI::ilPCListGUI | ( | &$ | a_pg_obj, | |
| &$ | a_content_obj, | |||
| $ | a_hier_id | |||
| ) |
Constructor public.
Definition at line 44 of file class.ilPCListGUI.php.
References ilPageContentGUI::ilPageContentGUI().
{
parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id);
}
Here is the call graph for this function:| ilPCListGUI::insert | ( | ) |
insert new list form
Definition at line 74 of file class.ilPCListGUI.php.
References ilPageContentGUI::displayValidationError(), formSelect(), and setTabs().
Referenced by create().
{
$this->setTabs();
// new list form (list item number)
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.list_new.html", "content");
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_insert_list"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->displayValidationError();
for($i=1; $i<=10; $i++)
{
$nr[$i] = $i;
}
// select fields for number of columns
$this->tpl->setVariable("TXT_ORDER", $this->lng->txt("cont_order"));
$order = array("Unordered" => $this->lng->txt("cont_Unordered"),
"Number" => $this->lng->txt("cont_Number"),
"Roman" => $this->lng->txt("cont_Roman"),
"roman" => $this->lng->txt("cont_roman"),
"Alphabetic" => $this->lng->txt("cont_Alphabetic"),
"alphabetic" => $this->lng->txt("cont_alphabetic"));
$select_order = ilUtil::formSelect ("","list_order",$order,false,true);
$this->tpl->setVariable("SELECT_ORDER", $select_order);
$this->tpl->setVariable("TXT_NR_ITEMS", $this->lng->txt("cont_nr_items"));
$select_items = ilUtil::formSelect ("2","nr_items",$nr,false,true);
$this->tpl->setVariable("SELECT_NR_ITEMS", $select_items);
$this->tpl->parseCurrentBlock();
// operations
$this->tpl->setCurrentBlock("commands");
$this->tpl->setVariable("BTN_NAME", "create_list");
$this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
$this->tpl->setVariable("BTN_CANCEL", "cancelCreate");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPCListGUI::saveProperties | ( | ) |
save table properties in db and return to page edit screen
Definition at line 181 of file class.ilPCListGUI.php.
References $_POST, and edit().
{
$this->content_obj->setOrderType($_POST["list_order"]);
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
else
{
$this->pg_obj->addHierIDs();
$this->edit();
}
}
Here is the call graph for this function:| ilPCListGUI::setTabs | ( | ) |
output tabs
Definition at line 199 of file class.ilPCListGUI.php.
References getTabs().
Referenced by edit(), and insert().
{
// catch feedback message
include_once("classes/class.ilTabsGUI.php");
$tabs_gui =& new ilTabsGUI();
$this->getTabs($tabs_gui);
$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1