ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCContentIncludeGUI Class Reference

Class ilPCContentIncludeGUI. More...

+ Inheritance diagram for ilPCContentIncludeGUI:
+ Collaboration diagram for ilPCContentIncludeGUI:

Public Member Functions

 ilPCContentIncludeGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor public.
executeCommand ()
 execute command
 insert ()
 Insert new resources component form.
 insertFromPool ($a_post_cmd="edpost", $a_submit_cmd="create_mob")
 Insert page snippet from media pool.
 poolSelection ()
 Pool Selection.
 create ()
 create new content include in dom and update page in db
 selectPool ()
 Select concrete pool.
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public.
 setStyleId ($a_styleid)
 Set Style Id.
 getStyleId ()
 Get Style Id.
 setEnableInternalLinks ($a_val)
 Set enable internal links.
 getEnableInternalLinks ()
 Get enable internal links.
 setEnableKeywords ($a_val)
 Set enable keywords handling.
 getEnableKeywords ()
 Get enable keywords handling.
 setEnableAnchors ($a_val)
 Set enable anchors.
 getEnableAnchors ()
 Get enable anchors.
 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
- 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 ilPCContentIncludeGUI.

User Interface for Content Includes (Snippets) 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.ilPCContentIncludeGUI.php.

Member Function Documentation

ilPCContentIncludeGUI::create ( )

create new content include in dom and update page in db

Definition at line 159 of file class.ilPCContentIncludeGUI.php.

References $_GET, $_POST, $ilCtrl, ilPageContentGUI\$lng, and insert().

{
global $ilCtrl, $lng;
if (is_array($_POST["id"]))
{
for($i = count($_POST["id"]) - 1; $i>=0; $i--)
{
// similar code in ilpageeditorgui::insertFromClipboard
include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
include_once("./Services/COPage/classes/class.ilPCMediaObject.php");
$this->content_obj = new ilPCContentInclude($this->dom);
$this->content_obj->create($this->pg_obj, $_GET["hier_id"], $this->pc_id);
$this->content_obj->setContentType("mep");
$this->content_obj->setContentId($_POST["id"][$i]);
}
$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:

& ilPCContentIncludeGUI::executeCommand ( )

execute command

Definition at line 32 of file class.ilPCContentIncludeGUI.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;
}
ilPCContentIncludeGUI::ilPCContentIncludeGUI ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor public.

Definition at line 24 of file class.ilPCContentIncludeGUI.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:

ilPCContentIncludeGUI::insert ( )

Insert new resources component form.

Definition at line 53 of file class.ilPCContentIncludeGUI.php.

References $_GET, insertFromPool(), poolSelection(), and selectPool().

Referenced by create().

{
switch ($_GET["subCmd"])
{
case "selectPool":
$this->selectPool();
break;
case "poolSelection":
$this->poolSelection();
break;
default:
$this->insertFromPool($a_post_cmd, $a_submit_cmd);
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCContentIncludeGUI::insertFromPool (   $a_post_cmd = "edpost",
  $a_submit_cmd = "create_mob" 
)

Insert page snippet from media pool.

Definition at line 74 of file class.ilPCContentIncludeGUI.php.

References $_SESSION, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilObject\_lookupObjId(), ilObject\_lookupType(), ilMediaPoolTableGUI\IL_MEP_SELECT_CONTENT, and poolSelection().

Referenced by insert().

{
global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng;
if ($_SESSION["cont_media_pool"] != "" &&
$ilAccess->checkAccess("write", "", $_SESSION["cont_media_pool"])
&& ilObject::_lookupType(ilObject::_lookupObjId($_SESSION["cont_media_pool"])) == "mep")
{
$tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
$tpl->setCurrentBlock("btn_cell");
$ilCtrl->setParameter($this, "subCmd", "poolSelection");
$tpl->setVariable("BTN_LINK",
$ilCtrl->getLinkTarget($this, "insert"));
$ilCtrl->setParameter($this, "subCmd", "");
$tpl->setVariable("BTN_TXT", $lng->txt("cont_select_media_pool"));
$tpl->parseCurrentBlock();
// $this->getTabs($ilTabs, true);
// $ilTabs->setSubTabActive("cont_mob_from_media_pool");
include_once("./Modules/MediaPool/classes/class.ilObjMediaPool.php");
include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
$pool = new ilObjMediaPool($_SESSION["cont_media_pool"]);
$ilCtrl->setParameter($this, "subCmd", "insertFromPool");
$mpool_table = new ilMediaPoolTableGUI($this, "insert", $pool, "mep_folder",
$mpool_table->setInsertCommand("create_incl");
$tpl->setContent($mpool_table->getHTML());
}
else
{
$this->poolSelection();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCContentIncludeGUI::poolSelection ( )

Pool Selection.

Definition at line 114 of file class.ilPCContentIncludeGUI.php.

References $_GET, $ilCtrl, ilPageContentGUI\$tpl, IL_FM_POSITIVE, and ilPoolSelectorGUI\setContentGUIClass().

Referenced by insert(), and insertFromPool().

{
global $ilCtrl, $tree, $tpl, $ilTabs;
// $this->getTabs($ilTabs, true);
// $ilTabs->setSubTabActive("cont_mob_from_media_pool");
include_once "./Services/COPage/classes/class.ilPoolSelectorGUI.php";
$exp = new ilPoolSelectorGUI($this->ctrl->getLinkTarget($this, "insert"));
$exp->setContentGUIClass(get_class($this));
if ($_GET["expand"] == "")
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET["expand"];
}
$exp->setExpand($expanded);
$exp->setTargetGet("sel_id");
$this->ctrl->setParameter($this, "target_type", $a_type);
$ilCtrl->setParameter($this, "subCmd", "poolSelection");
$exp->setParamsGet($this->ctrl->getParameterArray($this, "insert"));
// filter
$exp->setFiltered(true);
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->addFilter("root");
$exp->addFilter("cat");
$exp->addFilter("grp");
$exp->addFilter("fold");
$exp->addFilter("crs");
$exp->addFilter("mep");
$sel_types = array('mep');
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCContentIncludeGUI::selectPool ( )

Select concrete pool.

Definition at line 190 of file class.ilPCContentIncludeGUI.php.

References $_GET, $_SESSION, and $ilCtrl.

Referenced by insert().

{
global $ilCtrl;
$_SESSION["cont_media_pool"] = $_GET["pool_ref_id"];
$ilCtrl->setParameter($this, "subCmd", "insertFromPool");
$ilCtrl->redirect($this, "insert");
}

+ Here is the caller graph for this function:


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