ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCMapGUI Class Reference

Class ilPCMapGUI. More...

+ Inheritance diagram for ilPCMapGUI:
+ Collaboration diagram for ilPCMapGUI:

Public Member Functions

 ilPCMapGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor public.
executeCommand ()
 execute command
 insert ()
 Insert new map form.
 edit ($a_insert=false)
 Edit map form.
 getValues ()
 Get values from object into form.
 initForm ($a_mode)
 Init map creation/update form.
 create ()
 Create new Map.
 update ()
 Update Map.
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public.
 setContentObject ($a_val)
 Set content object.
 getContentObject ()
 Get content object.
 setPage ($a_val)
 Set page.
 getPage ()
 Get page.
 setPageConfig ($a_val)
 Set Page Config.
 getPageConfig ()
 Get Page Config.
 setStyleId ($a_styleid)
 Set Style Id.
 getStyleId ()
 Get Style Id.
 getStyle ()
 Get style object.
 setCharacteristics ($a_chars)
 Set Characteristics.
 getCharacteristics ()
 Get characteristics.
 getHierId ()
 get hierarchical id in dom object
 setHierId ($a_hier_id)
 get hierarchical id in dom object
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl.
 delete ()
 delete content element
 moveAfter ()
 move content element after another element
 moveBefore ()
 move content element before another element
 splitPage ()
 split page to new page at specified position
 splitPageNext ()
 split page to next page at specified position
 displayValidationError ()
 display validation errors
 cancelCreate ()
 cancel creating page content
 cancelUpdate ()
 cancel update
 cancel ()
 Cancel.
 deactivate ()
 gui function set enabled if is not enabled and vice versa
 cut ()
 Cut single element.
 copy ()
 Copy single element.
 getTemplateOptions ($a_type)
 Get table templates.

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons.
- Data Fields inherited from ilPageContentGUI
 $content_obj
 $ilias
 $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.
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons

Detailed Description

Class ilPCMapGUI.

User Interface for Map Editing

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

Definition at line 37 of file class.ilPCMapGUI.php.

Member Function Documentation

ilPCMapGUI::create ( )

Create new Map.

Definition at line 193 of file class.ilPCMapGUI.php.

References $location, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), ilPageContentGUI\getPage(), and initForm().

{
global $tpl;
$this->initForm("create");
if ($this->form->checkInput())
{
$this->content_obj = new ilPCMap($this->getPage());
$location = $this->form->getInput("location");
$this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
$this->content_obj->setLatitude($location["latitude"]);
$this->content_obj->setLongitude($location["longitude"]);
$this->content_obj->setZoom($location["zoom"]);
$this->content_obj->setLayout($this->form->getInput("width"),
$this->form->getInput("height"),
$this->form->getInput("horizontal_align"));
$this->content_obj->setCaption(
$this->content_obj->handleCaptionInput($this->form->getInput("caption")));
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
return;
}
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilPCMapGUI::edit (   $a_insert = false)

Edit map form.

Definition at line 85 of file class.ilPCMapGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, $ret, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), getValues(), and initForm().

{
global $ilCtrl, $tpl, $lng;
$this->initForm("update");
$this->getValues();
$tpl->setContent($this->form->getHTML());
return $ret;
}

+ Here is the call graph for this function:

& ilPCMapGUI::executeCommand ( )

execute command

Definition at line 52 of file class.ilPCMapGUI.php.

References $cmd, and $ret.

{
// get next class that processes or forwards current command
$next_class = $this->ctrl->getNextClass($this);
// get current command
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}
ilPCMapGUI::getValues ( )

Get values from object into form.

Definition at line 100 of file class.ilPCMapGUI.php.

Referenced by edit().

{
$values = array();
$values["location"]["latitude"] = $this->content_obj->getLatitude();
$values["location"]["longitude"] = $this->content_obj->getLongitude();
$values["location"]["zoom"] = $this->content_obj->getZoom();
$values["width"] = $this->content_obj->getWidth();
$values["height"] = $this->content_obj->getHeight();
$values["caption"] = $this->content_obj->handleCaptionFormOutput($this->content_obj->getCaption());
$values["horizontal_align"] = $this->content_obj->getHorizontalAlign();
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

ilPCMapGUI::ilPCMapGUI ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor public.

Definition at line 44 of file class.ilPCMapGUI.php.

References ilPageContentGUI\ilPageContentGUI().

{
parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
}

+ Here is the call graph for this function:

ilPCMapGUI::initForm (   $a_mode)

Init map creation/update form.

Definition at line 118 of file class.ilPCMapGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, $options, ilFormPropertyGUI\setRequired(), and ilNumberInputGUI\setSize().

Referenced by create(), edit(), insert(), and update().

{
global $ilCtrl, $lng;
// edit form
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($ilCtrl->getFormAction($this));
if ($a_mode == "create")
{
$this->form->setTitle($this->lng->txt("cont_insert_map"));
}
else
{
$this->form->setTitle($this->lng->txt("cont_update_map"));
}
// location
$loc_prop = new ilLocationInputGUI($this->lng->txt("cont_location"),
"location");
$loc_prop->setRequired(true);
$this->form->addItem($loc_prop);
// width
$width_prop = new ilNumberInputGUI($this->lng->txt("cont_width"),
"width");
$width_prop->setSize(4);
$width_prop->setMaxLength(4);
$width_prop->setRequired(true);
$width_prop->setMinValue(250);
$this->form->addItem($width_prop);
// height
$height_prop = new ilNumberInputGUI($this->lng->txt("cont_height"),
"height");
$height_prop->setSize(4);
$height_prop->setMaxLength(4);
$height_prop->setRequired(true);
$height_prop->setMinValue(200);
$this->form->addItem($height_prop);
// horizonal align
$align_prop = new ilSelectInputGUI($this->lng->txt("cont_align"),
"horizontal_align");
$options = array(
"Left" => $lng->txt("cont_left"),
"Center" => $lng->txt("cont_center"),
"Right" => $lng->txt("cont_right"),
"LeftFloat" => $lng->txt("cont_left_float"),
"RightFloat" => $lng->txt("cont_right_float"));
$align_prop->setOptions($options);
$this->form->addItem($align_prop);
// caption
$caption_prop = new ilTextAreaInputGUI($this->lng->txt("cont_caption"),
"caption");
$this->form->addItem($caption_prop);
// save/cancel buttons
if ($a_mode == "create")
{
$this->form->addCommandButton("create_map", $lng->txt("save"));
$this->form->addCommandButton("cancelCreate", $lng->txt("cancel"));
}
else
{
$this->form->addCommandButton("update_map", $lng->txt("save"));
$this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
}
//$html = $form->getHTML();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCMapGUI::insert ( )

Insert new map form.

Definition at line 73 of file class.ilPCMapGUI.php.

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and initForm().

{
global $tpl;
$this->initForm("create");
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilPCMapGUI::update ( )

Update Map.

Definition at line 226 of file class.ilPCMapGUI.php.

References $location, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and initForm().

{
global $tpl;
$this->initForm("update");
if ($this->form->checkInput())
{
$location = $this->form->getInput("location");
$this->content_obj->setLatitude($location["latitude"]);
$this->content_obj->setLongitude($location["longitude"]);
$this->content_obj->setZoom($location["zoom"]);
$this->content_obj->setLayout($this->form->getInput("width"),
$this->form->getInput("height"),
$this->form->getInput("horizontal_align"));
$this->content_obj->setCaption(
$this->content_obj->handleCaptionInput($this->form->getInput("caption")));
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
return;
}
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:


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