4 require_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
5 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
34 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
38 $this->ctrl = $DIC->ctrl();
39 $this->access = $DIC->access();
40 $this->tabs = $DIC->tabs();
41 $this->tpl = $DIC[
"tpl"];
42 $this->lng = $DIC->language();
43 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
52 $next_class = $this->ctrl->getNextClass($this);
55 $cmd = $this->ctrl->getCmd();
57 switch ($next_class) {
71 switch (
$_GET[
"subCmd"]) {
89 public function insertFromPool($a_post_cmd =
"edpost", $a_submit_cmd =
"create_mob")
99 $ilAccess->checkAccess(
"write",
"",
$_SESSION[
"cont_media_pool"])
104 $ilCtrl->setParameter($this,
"subCmd",
"poolSelection");
107 $lng->txt(
"cont_select_media_pool"),
108 $ilCtrl->getLinkTarget($this,
"insert")
110 $html = $tb->getHTML();
112 $ilCtrl->setParameter($this,
"subCmd",
"");
114 include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
115 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
117 $ilCtrl->setParameter($this,
"subCmd",
"insertFromPool");
125 $mpool_table->setInsertCommand(
"create_incl");
127 $html.= $mpool_table->getHTML();
146 include_once
"./Services/COPage/classes/class.ilPoolSelectorGUI.php";
147 $ilCtrl->setParameter($this,
"subCmd",
"poolSelection");
151 $exp->setTypeWhiteList(
array(
"root",
"cat",
"grp",
"fold",
"crs",
"mep"));
152 $exp->setClickableTypes(
array(
'mep'));
154 if (!$exp->handleCommand()) {
155 $tpl->setContent($exp->getHTML());
167 if (is_array(
$_POST[
"id"])) {
170 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
171 include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
173 $this->content_obj->create($this->pg_obj,
$_GET[
"hier_id"], $this->pc_id);
174 $this->content_obj->setContentType(
"mep");
175 $this->content_obj->setContentId(
$_POST[
"id"][
$i]);
177 $this->updated = $this->pg_obj->update();
179 if ($this->updated ===
true) {
180 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
194 $ilCtrl->setParameter($this,
"subCmd",
"insertFromPool");
195 $ilCtrl->redirect($this,
"insert");
Class ilPCContentIncludeGUI.
poolSelection()
Pool Selection.
insert()
Insert new resources component form.
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
insertFromPool($a_post_cmd="edpost", $a_submit_cmd="create_mob")
Insert page snippet from media pool.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
Class ilPCContentInclude.
static _lookupObjId($a_id)
executeCommand()
execute command
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
create()
create new content include in dom and update page in db
Select media pool for adding objects into pages.
selectPool()
Select concrete pool.