ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjStyleSettingsGUI Class Reference

Style settings GUI class. More...

+ Inheritance diagram for ilObjStyleSettingsGUI:
+ Collaboration diagram for ilObjStyleSettingsGUI:

Public Member Functions

 ilObjStyleSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor.
executeCommand ()
 Execute command.
 saveObject ()
 Save object.
 editContentStylesObject ()
 view list of styles
 moveLMStylesObject ()
 move learning modules from one style to another
 moveIndividualStylesObject ()
 move all learning modules with individual styles to new style
 confirmDeleteIndividualStyles ()
 editSystemStylesObject ()
 edit system styles
 saveStyleSettingsObject ()
 save skin and style settings
 moveUserStylesObject ()
 Move user styles.
 deleteStyleObject ($a_error=false)
 display deletion confirmation screen
 confirmedDeleteObject ()
 delete selected style objects
 toggleGlobalDefaultObject ()
 Toggle global default style.
 toggleGlobalFixedObject ()
 Toggle global fixed style.
 saveActiveStylesObject ()
 Save active styles.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 cancelDeleteObject ()
 cancel deletion of object
 setScopeObject ()
 saveScopeObject ()
 save scope for style
 viewPageLayoutsObject ()
 view list of page layouts
 activateObject ($a_activate=true)
 deactivateObject ()
 deletePglObject ()
 display deletion confirmation screen
 cancelDeletePgObject ()
 cancel deletion of Page Layout
 confirmedDeletePgObject ()
 conform deletion of Page Layout
 addPageLayoutObject ($a_form=null)
 initAddPageLayoutForm ()
 createPgObject ()
 cancelCreateObject ()
 editPgObject ()
 setTabs ()
 set admin tabs public
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
 createStyleObject ()
 Create new style.
 savePageLayoutTypesObject ()
 Save page layout types.
 exportLayoutObject ()
 Export page layout template object.
 importPageLayoutFormObject ()
 Import page layout.
 initPageLayoutImportForm ()
 Init page layout import form.
 importPageLayoutObject ()
 Import page layout.
 assignStylesToCatsObject ()
 Assign styles to cats.
 addStyleCatAssignmentObject ()
 Add style category assignment.
 saveStyleCatAssignmentObject ()
 Save style category assignment.
 deleteSysStyleCatAssignmentsObject ()
 Delete system style to category assignments.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Data Fields

 $peditor_active = false
 $pg_id = null
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Detailed Description

Style settings GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilObjStyleSettingsGUI.php 49637 2014-04-24 10:02:54Z akill

ilObjStyleSettingsGUI: ilPermissionGUI, ilPageLayoutGUI

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

Member Function Documentation

ilObjStyleSettingsGUI::activateObject (   $a_activate = true)

Definition at line 642 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilUtil\sendInfo(), and ilUtil\sendSuccess().

Referenced by deactivateObject().

{
if (!isset($_POST["pglayout"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
} else {
ilUtil::sendSuccess($this->lng->txt("sty_opt_saved"),true);
foreach ($_POST["pglayout"] as $item)
{
$pg_layout = new ilPageLayout($item);
$pg_layout->activate($a_activate);
}
}
$this->ctrl->redirect($this, "viewPageLayouts");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::addPageLayoutObject (   $a_form = null)

Definition at line 723 of file class.ilObjStyleSettingsGUI.php.

References initAddPageLayoutForm().

Referenced by createPgObject().

{
global $ilTabs;
$ilTabs->setTabActive('page_layouts');
if(!$a_form)
{
$a_form = $this->initAddPageLayoutForm();
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::addStyleCatAssignmentObject ( )

Add style category assignment.

Parameters
@return

Definition at line 1117 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $_REQUEST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, and ilExplorer\setExpand().

{
global $ilCtrl, $ilTabs, $lng, $tree, $tpl, $rbacsystem;
if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
return;
}
$ilCtrl->setParameter($this, "style_id", urlencode($_GET["style_id"]));
$ilCtrl->setParameter($this, "substyle", urlencode($_REQUEST["substyle"]));
include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
$ilCtrl->getLinkTarget($this,'addStyleCatAssignment'));
$exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
$exp->setExpandTarget($ilCtrl->getLinkTarget($this,'addStyleCatAssignment'));
$exp->setTargetClass(get_class($this));
$exp->setCmd('saveStyleCatAssignment');
$exp->setClickableTypes(array("cat"));
// build html-output
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::assignStylesToCatsObject ( )

Assign styles to cats.

Parameters
@return

Definition at line 1072 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $options, $si, $tab, ilObjectGUI\$tpl, and ilStyleDefinition\getAllSkinStyles().

{
global $ilToolbar, $ilCtrl, $tpl, $lng, $rbacsystem;
$ilCtrl->setParameter($this, "style_id", urlencode($_GET["style_id"]));
if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
return;
}
$sel_style = $all_styles[$_GET["style_id"]];
$options = array();
if (is_array($sel_style["substyle"]))
{
foreach ($sel_style["substyle"] as $subst)
{
$options[$subst["id"]] = $subst["name"];
}
}
// substyle
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$si = new ilSelectInputGUI($this->lng->txt("sty_substyle"), "substyle");
$si->setOptions($options);
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("sty_add_assignment"), "addStyleCatAssignment");
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
include_once("./Services/Style/classes/class.ilSysStyleCatAssignmentTableGUI.php");
$tab = new ilSysStyleCatAssignmentTableGUI($this, "assignStylesToCats");
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::cancelCreateObject ( )

Definition at line 862 of file class.ilObjStyleSettingsGUI.php.

References viewPageLayoutsObject().

{
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::cancelDeleteObject ( )

cancel deletion of object

public

Reimplemented from ilObjectGUI.

Definition at line 557 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::cancelDeletePgObject ( )

cancel deletion of Page Layout

Definition at line 703 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "viewPageLayouts");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::confirmDeleteIndividualStyles ( )

Definition at line 223 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObject\_lookupTitle().

Referenced by moveLMStylesObject().

{
global $ilCtrl, $tpl, $lng;
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$ilCtrl->setParameter($this, "to_style", $_POST["to_style"]);
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("sty_confirm_del_ind_styles").": ".
sprintf($this->lng->txt("sty_confirm_del_ind_styles_desc"),
$cgui->setCancel($lng->txt("cancel"), "editContentStyles");
$cgui->setConfirm($lng->txt("ok"), "moveIndividualStyles");
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::confirmedDeleteObject ( )

delete selected style objects

Reimplemented from ilObjectGUI.

Definition at line 415 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjectGUI\$ilias, ilObjectGUI\getReturnLocation(), and ilUtil\redirect().

{
global $ilias;
foreach($_POST["id"] as $id)
{
$this->object->removeStyle($id);
$style_obj =& $ilias->obj_factory->getInstanceByObjId($id);
$style_obj->delete();
}
$this->object->update();
$this->ctrl->getLinkTarget($this,"editContentStyles","",false,false)));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::confirmedDeletePgObject ( )

conform deletion of Page Layout

Definition at line 712 of file class.ilObjStyleSettingsGUI.php.

References $_POST.

{
foreach ($_POST["pglayout"] as $id)
{
$pg_obj = new ilPageLayout($id);
$pg_obj->delete();
}
$this->ctrl->redirect($this, "viewPageLayouts");
}
ilObjStyleSettingsGUI::createPgObject ( )

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

References $ilCtrl, addPageLayoutObject(), and initAddPageLayoutForm().

{
global $ilCtrl;
$form_gui = $this->initAddPageLayoutForm();
if(!$form_gui->checkInput())
{
$form_gui->setValuesByPost();
return $this->addPageLayoutObject($form_gui);
}
//create Page-Layout-Object first
$pg_object = new ilPageLayout();
$pg_object->setTitle($form_gui->getInput('pgl_title'));
$pg_object->setDescription($form_gui->getInput('pgl_desc'));
$pg_object->setSpecialPage($form_gui->getInput('special_page'));
$pg_object->setModules($form_gui->getInput('module'));
$pg_object->update();
include_once("./Services/Style/classes/class.ilPageLayoutPage.php");
//create Page
if(!is_object($pg_content))
{
$this->pg_content = new ilPageLayoutPage();
}
$this->pg_content->setId($pg_object->getId());
$tmpl = $form_gui->getInput('pgl_template');
if ($tmpl != "-1")
{
$layout_obj = new ilPageLayout($tmpl);
$this->pg_content->setXMLContent($layout_obj->getXMLContent());
$this->pg_content->create(false);
}
else
{
$this->pg_content->create(false);
}
$ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $pg_object->getId());
$ilCtrl->redirectByClass("ilpagelayoutgui", "edit");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::createStyleObject ( )

Create new style.

Definition at line 929 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setParameter($this, "new_type", "sty");
$ilCtrl->redirect($this, "create");
}
ilObjStyleSettingsGUI::deactivateObject ( )

Definition at line 657 of file class.ilObjStyleSettingsGUI.php.

References activateObject().

{
$this->activateObject(false);
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deletePglObject ( )

display deletion confirmation screen

Definition at line 666 of file class.ilObjStyleSettingsGUI.php.

References $_POST, and ilUtil\getImageTagByType().

{
global $ilTabs;
if(!isset($_POST["pglayout"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$ilTabs->setTabActive('page_layouts');
unset($this->data);
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setHeaderText($this->lng->txt("info_delete_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "cancelDeletePg");
$cgui->setConfirm($this->lng->txt("confirm"), "confirmedDeletePg");
foreach($_POST["pglayout"] as $id)
{
$pg_obj = new ilPageLayout($id);
$pg_obj->readObject();
$caption = ilUtil::getImageTagByType("stys", $this->tpl->tplPath).
" ".$pg_obj->getTitle();
$cgui->addItem("pglayout[]", $id, $caption);
}
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deleteStyleObject (   $a_error = false)

display deletion confirmation screen

public

Definition at line 385 of file class.ilObjStyleSettingsGUI.php.

References $_POST, and ilUtil\getImageTagByType().

{
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setHeaderText($this->lng->txt("info_delete_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
$cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
foreach ($_POST["id"] as $id)
{
$caption = ilUtil::getImageTagByType("sty", $this->tpl->tplPath).
" ".ilObject::_lookupTitle($id);
$cgui->addItem("id[]", $id, $caption);
}
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deleteSysStyleCatAssignmentsObject ( )

Delete system style to category assignments.

Definition at line 1172 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilStyleDefinition\deleteSystemStyleCategoryAssignment(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng, $rbacsystem;
if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
return;
}
$ilCtrl->setParameter($this, "style_id", urlencode($_GET["style_id"]));
$style_arr = explode(":", $_GET["style_id"]);
if (is_array($_POST["id"]))
{
foreach ($_POST["id"] as $id)
{
$id_arr = explode(":", $id);
$id_arr[0], $id_arr[1]);
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "assignStylesToCats");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editContentStylesObject ( )

view list of styles

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

References ilObjectGUI\$data, $ilCtrl, ilObjectGUI\$ilias, ilObjectGUI\$lng, $si, ilObjectGUI\$tpl, ilObjContentObject\_getNrLMsIndividualStyles(), ilObjContentObject\_getNrLMsNoStyle(), ilObjContentObject\_getNrOfAssignedLMs(), and ilObjStyleSheet\_lookupActive().

{
global $rbacsystem, $ilias, $tpl, $ilToolbar, $ilCtrl, $lng;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
// this may not be cool, if styles are organised as (independent) Service
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$from_styles = $to_styles = $data = array();
$styles = $this->object->getStyles();
foreach($styles as $style)
{
$style["active"] = ilObjStyleSheet::_lookupActive($style["id"]);
$style["lm_nr"] = ilObjContentObject::_getNrOfAssignedLMs($style["id"]);
$data[$style["title"].":".$style["id"]]
= $style;
if ($style["lm_nr"] > 0)
{
$from_styles[$style["id"]] = $style["title"];
}
if ($style["active"] > 0)
{
$to_styles[$style["id"]] = $style["title"];
}
}
// number of individual styles
if ($fixed_style <= 0)
{
$data[-1] =
array("title" => $this->lng->txt("sty_individual_styles"),
$from_styles[-1] = $this->lng->txt("sty_individual_styles");
}
// number of default style (fallback default style)
if ($default_style <= 0 && $fixed_style <= 0)
{
$data[0] =
array("title" => $this->lng->txt("sty_default_style"),
"id" => 0, "lm_nr" => ilObjContentObject::_getNrLMsNoStyle());
$from_styles[0] = $this->lng->txt("sty_default_style");
$to_styles[0] = $this->lng->txt("sty_default_style");
}
if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$ilToolbar->addButton($lng->txt("sty_add_content_style"),
$ilCtrl->getLinkTarget($this, "createStyle"));
$ilToolbar->addSeparator();
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
// from styles selector
$si = new ilSelectInputGUI($lng->txt("sty_move_lm_styles").": ".$lng->txt("sty_from"), "from_style");
$si->setOptions($from_styles);
$ilToolbar->addInputItem($si, true);
// from styles selector
$si = new ilSelectInputGUI($lng->txt("sty_to"), "to_style");
$si->setOptions($to_styles);
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("sty_move_style"), "moveLMStyles");
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
}
include_once("./Services/Style/classes/class.ilContentStylesTableGUI.php");
$table = new ilContentStylesTableGUI($this, "editContentStyles", $data, $this->object);
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editPgObject ( )

Definition at line 866 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, and executeCommand().

{
global $ilCtrl, $rbacsystem;
if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$ilCtrl->setCmdClass("ilpagelayoutgui");
$ilCtrl->setCmd("edit");
$this->executeCommand();
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editSystemStylesObject ( )

edit system styles

Definition at line 244 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$ilias, ilObjectGUI\$lng, $options, $si, $tab, ilObjectGUI\$tpl, and ilStyleDefinition\getAllSkinStyles().

{
global $rbacsystem, $ilias, $styleDefinition, $ilToolbar, $ilCtrl, $lng, $tpl;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
// toolbar
// default skin/style
if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
{
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$options = array();
{
$options[$st["id"]] = $st["title"];
}
// from styles selector
$si = new ilSelectInputGUI($lng->txt("sty_move_user_styles").": ".$lng->txt("sty_from"), "from_style");
$si->setOptions($options + array("other" => $lng->txt("other")));
$ilToolbar->addInputItem($si, true);
// from styles selector
$si = new ilSelectInputGUI($lng->txt("sty_to"), "to_style");
$si->setOptions($options);
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("sty_move_style"), "moveUserStyles");
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
}
include_once("./Services/Style/classes/class.ilSystemStylesTableGUI.php");
$tab = new ilSystemStylesTableGUI($this, "editSystemStyles");
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

& ilObjStyleSettingsGUI::executeCommand ( )

Execute command.

Reimplemented from ilObjectGUI.

Definition at line 46 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $cmd, $ret, and ilObjectGUI\prepareOutput().

Referenced by editPgObject().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
if ($next_class == "ilpagelayoutgui" || $cmd =="createPg") {
$this->peditor_active =true;
}
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilpagelayoutgui':
include_once("./Services/Style/classes/class.ilPageLayoutGUI.php");
$this->tpl->getStandardTemplate();
$this->ctrl->setReturn($this, "edit");
if ($this->pg_id!=null) {
$layout_gui =& new ilPageLayoutGUI($this->type,$this->pg_id);
} else {
$layout_gui =& new ilPageLayoutGUI($this->type,$_GET["obj_id"]);
}
$layout_gui->setTabs();
$layout_gui->setEditPreview(true);
$this->ctrl->saveParameter($this, "obj_id");
$ret =& $this->ctrl->forwardCommand($layout_gui);
$this->tpl->setContent($ret);
break;
default:
if ($cmd == "" || $cmd == "view")
{
$cmd = "editSystemStyles";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::exportLayoutObject ( )

Export page layout template object.

Definition at line 977 of file class.ilObjStyleSettingsGUI.php.

References $_GET, ilUtil\deliverFile(), ilUtil\ilTempnam(), and ilUtil\makeDir().

{
include_once("./Services/Export/classes/class.ilExport.php");
$exp = new ilExport();
$tmpdir = ilUtil::ilTempnam();
ilUtil::makeDir($tmpdir);
$succ = $exp->exportEntity("pgtp", (int) $_GET["layout_id"], "4.2.0",
"Services/COPage", "Title", $tmpdir);
if ($succ["success"])
{
ilUtil::deliverFile($succ["directory"]."/".$succ["file"], $succ["file"],
"", false, false, false);
}
if (is_file($succ["directory"]."/".$succ["file"]))
{
unlink($succ["directory"]."/".$succ["file"]);
}
if (is_dir($succ["directory"]))
{
unlink($succ["directory"]);
}
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 886 of file class.ilObjStyleSettingsGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 896 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\$lng.

Referenced by getAdminTabs().

{
global $rbacsystem, $lng, $ilTabs;
if ($this->peditor_active) {
$tabs_gui->setBackTarget($this->lng->txt("page_layouts"),
$this->ctrl->getLinkTarget($this, "viewPageLayouts"));
}
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()) && !$this->peditor_active)
{
$tabs_gui->addTarget("system_styles",
$this->ctrl->getLinkTarget($this, "editSystemStyles"), array("editSystemStyles", "", "view"), "", "");
$tabs_gui->addTarget("content_styles",
$this->ctrl->getLinkTarget($this, "editContentStyles"), "editContentStyles", "", "");
$tabs_gui->addTarget("page_layouts",
$this->ctrl->getLinkTarget($this, "viewPageLayouts"), "viewPageLayouts", "", "");
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()) && !$this->peditor_active)
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::ilObjStyleSettingsGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor.

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

References $cmd, $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $lng,$ilCtrl;
$this->type = "stys";
$cmd = $ilCtrl->getCmd();
if ($cmd == "editPg") {
$this->peditor_active = true;
}
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$lng->loadLanguageModule("style");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::importPageLayoutFormObject ( )

Import page layout.

Definition at line 1006 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\$tpl, and initPageLayoutImportForm().

{
global $tpl, $ilTabs;
$ilTabs->setTabActive('page_layouts');
$form = $this->initPageLayoutImportForm();
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::importPageLayoutObject ( )

Import page layout.

Definition at line 1043 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilPageLayout\import(), initPageLayoutImportForm(), and ilUtil\sendSuccess().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$form = $this->initPageLayoutImportForm();
if ($form->checkInput())
{
include_once("./Services/Style/classes/class.ilPageLayout.php");
$pg = ilPageLayout::import($_FILES["file"]["name"], $_FILES["file"]["tmp_name"]);
if ($pg > 0)
{
ilUtil::sendSuccess($lng->txt("sty_imported_layout"), true);
}
$ilCtrl->redirect($this, "viewPageLayouts");
}
else
{
$ilTabs->setTabActive('page_layouts');
$form->setValuesByPost();
$tpl->setContent($form->getHtml());
}
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::initAddPageLayoutForm ( )

Definition at line 737 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, $si, ilPageLayout\getAvailableModules(), ilPageLayout\getLayouts(), ilSelectInputGUI\setOptions(), ilTextInputGUI\setSize(), and ilTextAreaInputGUI\setValue().

Referenced by addPageLayoutObject(), and createPgObject().

{
global $lng, $ilCtrl;
$lng->loadLanguageModule("content");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form_gui = new ilPropertyFormGUI();
$form_gui->setFormAction($ilCtrl->getFormAction($this));
$form_gui->setTitle($lng->txt("sty_create_pgl"));
$title_input = new ilTextInputGUI($lng->txt("title"),"pgl_title");
$title_input->setSize(50);
$title_input->setMaxLength(128);
$title_input->setValue($this->layout_object->title);
$title_input->setTitle($lng->txt("title"));
$title_input->setRequired(true);
$desc_input = new ilTextAreaInputGUI($lng->txt("description"),"pgl_desc");
$desc_input->setValue($this->layout_object->description);
$desc_input->setRows(3);
$desc_input->setCols(37);
// special page?
$options = array(
"0" => $lng->txt("cont_layout_template"),
"1" => $lng->txt("cont_special_page"),
);
$si = new ilSelectInputGUI($this->lng->txt("type"), "special_page");
// modules
$mods = new ilCheckboxGroupInputGUI($this->lng->txt("modules"), "module");
// $mods->setRequired(true);
foreach(ilPageLayout::getAvailableModules() as $mod_id => $mod_caption)
{
$mod = new ilCheckboxOption($mod_caption, $mod_id);
$mods->addOption($mod);
}
$ttype_input = new ilSelectInputGUI($lng->txt("sty_based_on"), "pgl_template");
$arr_templates = ilPageLayout::getLayouts();
$arr_templates1 = ilPageLayout::getLayouts(false, true);
foreach ($arr_templates1 as $v)
{
$arr_templates[] = $v;
}
$options = array();
$options['-1'] = $lng->txt("none");
foreach ($arr_templates as $templ) {
$templ->readObject();
$key = $templ->getId();
$value = $templ->getTitle();
$options[$key] = $value;
}
$ttype_input->setOptions($options);
$ttype_input->setValue(-1);
$ttype_input->setRequired(true);
$desc_input->setTitle($lng->txt("description"));
$desc_input->setRequired(false);
$form_gui->addItem($title_input);
$form_gui->addItem($desc_input);
$form_gui->addItem($si);
$form_gui->addItem($mods);
$form_gui->addItem($ttype_input);
$form_gui->addCommandButton("createPg", $lng->txt("save"));
$form_gui->addCommandButton("cancelCreate", $lng->txt("cancel"));
return $form_gui;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::initPageLayoutImportForm ( )

Init page layout import form.

Definition at line 1018 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFileInputGUI\setSuffixes().

Referenced by importPageLayoutFormObject(), and importPageLayoutObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
// template file
$fi = new ilFileInputGUI($lng->txt("file"), "file");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$form->addItem($fi);
$form->addCommandButton("importPageLayout", $lng->txt("import"));
$form->addCommandButton("viewPageLayouts", $lng->txt("cancel"));
$form->setTitle($lng->txt("sty_import_page_layout"));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::moveIndividualStylesObject ( )

move all learning modules with individual styles to new style

Definition at line 213 of file class.ilObjStyleSettingsGUI.php.

References $_GET, and ilObjContentObject\_moveLMStyles().

{
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::moveLMStylesObject ( )

move learning modules from one style to another

Definition at line 196 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjContentObject\_moveLMStyles(), and confirmDeleteIndividualStyles().

{
if ($_POST["from_style"] == -1)
{
return;
}
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
ilObjContentObject::_moveLMStyles($_POST["from_style"], $_POST["to_style"]);
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::moveUserStylesObject ( )

Move user styles.

Parameters
@return

Definition at line 346 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjUser\_getAllUserAssignedStyles(), ilObjUser\_moveUsersToStyle(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
$to = explode(":", $_POST["to_style"]);
if ($_POST["from_style"] != "other")
{
$from = explode(":", $_POST["from_style"]);
ilObjUser::_moveUsersToStyle($from[0],$from[1],$to[0],$to[1]);
}
else
{
// get all user assigned styles
// move users that are not assigned to
// currently existing style
foreach($all_user_styles as $style)
{
if (!in_array($style, $all_styles))
{
$style_arr = explode(":", $style);
ilObjUser::_moveUsersToStyle($style_arr[0],$style_arr[1],$to[0],$to[1]);
}
}
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this , "editSystemStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveActiveStylesObject ( )

Save active styles.

Definition at line 485 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjStyleSheet\_writeActive(), and ilUtil\redirect().

{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$styles = $this->object->getStyles();
foreach($styles as $style)
{
if ($_POST["std_".$style["id"]] == 1)
{
ilObjStyleSheet::_writeActive((int) $style["id"], 1);
}
else
{
ilObjStyleSheet::_writeActive((int) $style["id"], 0);
}
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveObject ( )

Save object.

Reimplemented from ilObjectGUI.

Definition at line 97 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\getReturnLocation(), ilUtil\redirect(), and ilUtil\sendInfo().

{
global $rbacadmin;
// create and insert forum in objecttree
$newObj = parent::saveObject();
// put here object specific stuff
// always send a message
ilUtil::sendInfo($this->lng->txt("object_added"),true);
ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"","",false,false)));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::savePageLayoutTypesObject ( )

Save page layout types.

Definition at line 940 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $t, and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
include_once("./Services/Style/classes/class.ilPageLayout.php");
if (is_array($_POST["type"]))
{
foreach($_POST["type"] as $id => $t)
{
if ($id > 0)
{
$l = new ilPageLayout($id);
$l->readObject();
$l->setSpecialPage($t);
if(is_array($_POST["module"][$id]))
{
$l->setModules(array_keys($_POST["module"][$id]));
}
else
{
$l->setModules();
}
$l->update();
}
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"));
}
$ilCtrl->redirect($this, "viewPageLayouts");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveScopeObject ( )

save scope for style

Definition at line 599 of file class.ilObjStyleSettingsGUI.php.

References $_GET, ilObjectGUI\$ilias, ilObjStyleSheet\_writeScope(), and ilUtil\redirect().

{
global $ilias;
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
if ($_GET["cat"] == 0)
{
$_GET["cat"] == "";
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveStyleCatAssignmentObject ( )

Save style category assignment.

Parameters
@return

Definition at line 1150 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendSuccess(), and ilStyleDefinition\writeSystemStyleCategoryAssignment().

{
global $lng, $ilCtrl, $rbacsystem;
if (!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
return;
}
$ilCtrl->setParameter($this, "style_id", urlencode($_GET["style_id"]));
$style_arr = explode(":", $_GET["style_id"]);
$_GET["substyle"], $_GET["root_id"]);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "assignStylesToCats");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveStyleSettingsObject ( )

save skin and style settings

Definition at line 290 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, ilObjStyleSettings\_activateStyle(), ilObjStyleSettings\_deactivateStyle(), ilObjUser\_getNumberOfUsersForStyle(), ilStyleDefinition\getAllSkinStyles(), and ilUtil\sendSuccess().

{
global $styleDefinition, $ilCtrl;
// check if one style is activated
if (count($_POST["st_act"]) < 1)
{
$this->ilias->raiseError($this->lng->txt("at_least_one_style"), $this->ilias->error_obj->MESSAGE);
}
//set default skin and style
if ($_POST["default_skin_style"] != "")
{
$sknst = explode(":", $_POST["default_skin_style"]);
if ($this->ilias->ini->readVariable("layout","style") != $sknst[1] ||
$this->ilias->ini->readVariable("layout","skin") != $sknst[0])
{
$this->ilias->ini->setVariable("layout","skin", $sknst[0]);
$this->ilias->ini->setVariable("layout","style",$sknst[1]);
}
$this->ilias->ini->write();
}
// check if a style should be deactivated, that still has
// a user assigned to
foreach ($all_styles as $st)
{
if (!isset($_POST["st_act"][$st["id"]]))
{
if (ilObjUser::_getNumberOfUsersForStyle($st["template_id"], $st["style_id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cant_deactivate_if_users_assigned"), $this->ilias->error_obj->MESSAGE);
}
else
{
ilObjStyleSettings::_deactivateStyle($st["template_id"], $st["style_id"]);
}
}
else
{
ilObjStyleSettings::_activateStyle($st["template_id"], $st["style_id"]);
}
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this , "editSystemStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::setScopeObject ( )

Definition at line 564 of file class.ilObjStyleSettingsGUI.php.

References $_GET, and IL_FM_POSITIVE.

{
if ($_GET["id"] > 0)
{
include_once ("./Services/Style/classes/class.ilStyleScopeExplorer.php");
$exp = new ilStyleScopeExplorer("ilias.php?baseClass=ilRepositoryGUI&amp;cmd=goto");
$exp->setExpandTarget("ilias.php?baseClass=ilRepositoryGUI&amp;cmd=showTree");
$exp->setTargetGet("ref_id");
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->forceExpandAll(true, false);
$exp->addFilter("root");
$exp->addFilter("cat");
if ($_GET["expand"] == "")
{
$expanded = $this->tree->readRootId();
}
else
{
$expanded = $_GET["expand"];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
}
$this->tpl->setVariable("ADM_CONTENT", $output);
}
ilObjStyleSettingsGUI::setTabs ( )

set admin tabs public

Reimplemented from ilObjectGUI.

Definition at line 881 of file class.ilObjStyleSettingsGUI.php.

{
echo "settings_setTabs";
}
ilObjStyleSettingsGUI::showActions (   $with_subobjects = false)

show possible action (form buttons)

Parameters
booleanpublic

Definition at line 509 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\getImagePath(), and ilObjectGUI\showPossibleSubObjects().

{
// delete
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "deleteStyle");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "toggleGlobalDefault");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("toggleGlobalDefault"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "toggleGlobalFixed");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("toggleGlobalFixed"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "setScope");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("sty_set_scope"));
$this->tpl->parseCurrentBlock();
// save active styles
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "saveActiveStyles");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("sty_save_active_styles"));
$this->tpl->parseCurrentBlock();
if ($with_subobjects === true)
{
}
$this->tpl->setCurrentBlock("tbl_action_row");
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::toggleGlobalDefaultObject ( )

Toggle global default style.

Definition at line 435 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $ilSetting, ilObjectGUI\$lng, ilUtil\redirect(), and ilUtil\sendSuccess().

{
global $ilSetting, $lng;
if ($_GET["id"] > 0)
{
$ilSetting->delete("fixed_content_style_id");
$def_style = $ilSetting->get("default_content_style_id");
if ($def_style != $_GET["id"])
{
$ilSetting->set("default_content_style_id", (int) $_GET["id"]);
}
else
{
$ilSetting->delete("default_content_style_id");
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::toggleGlobalFixedObject ( )

Toggle global fixed style.

Definition at line 460 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $ilSetting, ilObjectGUI\$lng, ilUtil\redirect(), and ilUtil\sendSuccess().

{
global $ilSetting, $lng;
if ($_GET["id"] > 0)
{
$ilSetting->delete("default_content_style_id");
$fixed_style = $ilSetting->get("fixed_content_style_id");
if ($fixed_style == (int) $_GET["id"])
{
$ilSetting->delete("fixed_content_style_id");
}
else
{
$ilSetting->set("fixed_content_style_id", (int) $_GET["id"]);
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::viewPageLayoutsObject ( )

view list of page layouts

Definition at line 617 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

Referenced by cancelCreateObject().

{
global $tpl, $lng, $ilCtrl, $ilTabs, $ilToolbar, $rbacsystem;
$ilTabs->setTabActive('page_layouts');
// show toolbar, if write permission is given
if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$ilToolbar->addButton($lng->txt("sty_add_pgl"),
$ilCtrl->getLinkTarget($this, "addPageLayout"));
$ilToolbar->addButton($lng->txt("sty_import_page_layout"),
$ilCtrl->getLinkTarget($this, "importPageLayoutForm"));
}
$oa_tpl = new ilTemplate("tpl.stys_pglayout.html", true, true, "Services/Style");
include_once("./Services/Style/classes/class.ilPageLayoutTableGUI.php");
$pglayout_table = new ilPageLayoutTableGUI($this, "viewPageLayouts");
$oa_tpl->setVariable("PGLAYOUT_TABLE", $pglayout_table->getHTML());
$tpl->setContent($oa_tpl->get());
}

+ Here is the caller graph for this function:

Field Documentation

ilObjStyleSettingsGUI::$peditor_active = false

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

ilObjStyleSettingsGUI::$pg_id = null

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


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