4require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
    5require_once(
"./Services/COPage/classes/class.ilMediaAliasItem.php");
 
    6require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
   46    public function __construct($a_pg_obj, $a_content_obj, $a_hier_id = 0, $a_pc_id = 
"")
 
   50        $this->tpl = 
$DIC[
"tpl"];
 
   51        $this->lng = 
$DIC->language();
 
   52        $this->tabs = 
$DIC->tabs();
 
   53        $this->access = 
$DIC->access();
 
   54        $this->toolbar = 
$DIC->toolbar();
 
   55        $this->
user = $DIC->user();
 
   62        parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 
   65            "MediaContainer" => $this->lng->txt(
"cont_Media"),
 
   66            "MediaContainerMax50" => 
"MediaContainerMax50",
 
   67            "MediaContainerFull100" => 
"MediaContainerFull100" 
   73        $this->header = $a_title;
 
   88        $this->enabledmapareas = $a_enabledmapareas;
 
   98        return $this->enabledmapareas;
 
  113        $next_class = $this->ctrl->getNextClass($this);
 
  116        $cmd = $this->ctrl->getCmd();
 
  118        if (is_object($this->content_obj)) {
 
  119            $this->tpl->clearHeader();
 
  121            $this->
getTabs($this->tabs_gui);
 
  123            $mob = $this->content_obj->getMediaObject();
 
  124            if (is_object($mob)) {
 
  125                $tpl->setVariable(
"HEADER", 
$lng->txt(
"mob") . 
": " .
 
  126                    $this->content_obj->getMediaObject()->getTitle());
 
  127                $mob_gui = 
new ilObjMediaObjectGUI(
"", $this->content_obj->getMediaObject()->getId(), 
false, 
false);
 
  128                $mob_gui->setBackTitle($this->page_back_title);
 
  130                $mob_gui->getTabs($this->tabs_gui);
 
  135        switch ($next_class) {
 
  136            case "ilobjmediaobjectgui":
 
  137                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  138                $this->tpl->clearHeader();
 
  140                $this->tpl->setTitle($this->lng->txt(
"mob") . 
": " .
 
  141                    $this->content_obj->getMediaObject()->getTitle());
 
  142                $mob_gui = 
new ilObjMediaObjectGUI(
"", $this->content_obj->getMediaObject()->getId(), 
false, 
false);
 
  143                $mob_gui->setBackTitle($this->page_back_title);
 
  145                $ret = $this->ctrl->forwardCommand($mob_gui);
 
  149            case "ilpcimagemapeditorgui":
 
  150                require_once(
"./Services/COPage/classes/class.ilPCImageMapEditorGUI.php");
 
  151                $ilTabs->setTabActive(
"cont_inst_map_areas");
 
  156                $ret = $this->ctrl->forwardCommand($image_map_edit);
 
  162                $ret = $this->$cmd();
 
  172    public function insert($a_post_cmd = 
"edpost", $a_submit_cmd = 
"create_mob", $a_input_error = 
false)
 
  179        if (
$_GET[
"subCmd"] == 
"insertNew") {
 
  180            $_SESSION[
"cont_media_insert"] = 
"insertNew";
 
  182        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  183            $_SESSION[
"cont_media_insert"] = 
"insertFromPool";
 
  186        if ((
$_GET[
"subCmd"] == 
"") && 
$_SESSION[
"cont_media_insert"] != 
"") {
 
  190        switch (
$_GET[
"subCmd"]) {
 
  191            case "insertFromPool":
 
  195            case "poolSelection":
 
  206                $ilTabs->setSubTabActive(
"cont_new_mob");
 
  208                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  209                if ($a_input_error) {
 
  213                    $mob_gui->initForm(
"create");
 
  214                    $form = $mob_gui->getForm();
 
  216                $form->setFormAction(
$ilCtrl->getFormAction($this, 
"create_mob"));
 
  217                $form->clearCommandButtons();
 
  218                $form->addCommandButton(
"create_mob", 
$lng->txt(
"save"));
 
  219                $form->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  238        if (
$_GET[
"subCmd"] == 
"insertNew") {
 
  239            $_SESSION[
"cont_media_insert"] = 
"insertNew";
 
  241        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  242            $_SESSION[
"cont_media_insert"] = 
"insertFromPool";
 
  245        if ((
$_GET[
"subCmd"] == 
"") && 
$_SESSION[
"cont_media_insert"] != 
"") {
 
  249        switch (
$_GET[
"subCmd"]) {
 
  250            case "insertFromPool":
 
  254            case "poolSelection":
 
  264                $ilCtrl->setParameter($this, 
"subCmd", 
"changeObjectReference");
 
  265                $this->
getTabs($ilTabs, 
true, 
true);
 
  266                $ilTabs->setSubTabActive(
"cont_new_mob");
 
  271                $mob_gui->initForm(
"create");
 
  272                $form = $mob_gui->getForm();
 
  274                $form->clearCommandButtons();
 
  275                $form->addCommandButton(
"createNewObjectReference", 
$lng->txt(
"save"));
 
  276                $form->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  277                $this->tpl->setContent(
$form->getHTML());
 
  291            $this->content_obj->getPcId()
 
  293        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  296        if (($std_alias_item->getWidth() != 
"" && $std_alias_item->getHeight() != 
"")) {
 
  299        if ($std_alias_item->getWidth() == 
"" && $std_alias_item->getHeight() == 
"" 
  300            && $std_item->getWidth() != 
"" && $std_item->getHeight() != 
"") {
 
  321        if (
$_SESSION[
"cont_media_pool"] != 
"" &&
 
  322            $ilAccess->checkAccess(
"write", 
"", 
$_SESSION[
"cont_media_pool"])
 
  327            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  328            if ($a_change_obj_ref) {
 
  330                    $lng->txt(
"cont_switch_to_media_pool"),
 
  331                    $ilCtrl->getLinkTarget($this, 
"changeObjectReference")
 
  335                    $lng->txt(
"cont_switch_to_media_pool"),
 
  336                    $ilCtrl->getLinkTarget($this, 
"insert")
 
  339            $ilCtrl->setParameter($this, 
"subCmd", 
"");
 
  341            $html = $tb->getHTML();
 
  343            $this->
getTabs($ilTabs, 
true, $a_change_obj_ref);
 
  344            $ilTabs->setSubTabActive(
"cont_mob_from_media_pool");
 
  346            include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
 
  347            include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
 
  349            $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  350            $tcmd = ($a_change_obj_ref)
 
  351                ? 
"changeObjectReference" 
  353            $tmode = ($a_change_obj_ref)
 
  364            $html.= $mpool_table->getHTML();
 
  380        $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  381        if ($a_change_obj_ref) {
 
  382            $ilCtrl->redirect($this, 
"changeObjectReference");
 
  384            $ilCtrl->redirect($this, 
"insert");
 
  397        $this->
getTabs($ilTabs, 
true, $a_change_obj_ref);
 
  398        $ilTabs->setSubTabActive(
"cont_mob_from_media_pool");
 
  400        include_once 
"./Services/COPage/classes/class.ilPoolSelectorGUI.php";
 
  402        if ($a_change_obj_ref) {
 
  403            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  404            $exp = 
new ilPoolSelectorGUI($this, 
"changeObjectReference", $this, 
"changeObjectReference");
 
  406            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  411        $exp->setTypeWhiteList(array(
"root", 
"cat", 
"grp", 
"fold", 
"crs", 
"mep"));
 
  412        $exp->setClickableTypes(array(
'mep'));
 
  414        if (!$exp->handleCommand()) {
 
  415            $tpl->setContent($exp->getHTML());
 
  426        $this->
create(
false, 
true);
 
  437        if (is_array(
$_POST[
"id"]) && count(
$_POST[
"id"]) == 1) {
 
  438            include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  439            include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  441            $this->content_obj->readMediaObject($fid);
 
  442            $this->content_obj->updateObjectReference();
 
  443            $this->updated = $this->pg_obj->update();
 
  446            $ilCtrl->redirect($this, 
"changeObjectReference");
 
  448        $ilCtrl->redirect($this, 
"editAlias");
 
  454    public function &
create($a_create_alias = 
true, $a_change_obj_ref = 
false)
 
  459        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  460            if (is_array(
$_POST[
"id"])) {
 
  462                    include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  464                    include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  466                    $this->content_obj->readMediaObject($fid);
 
  467                    $this->content_obj->createAlias($this->pg_obj, 
$_GET[
"hier_id"], $this->pc_id);
 
  469                $this->updated = $this->pg_obj->update();
 
  472            $ilCtrl->returnToParent($this);
 
  477        $mob_gui->initForm(
"create");
 
  479        if (!$mob_gui->checkFormInput()) {
 
  480            $this->form = $mob_gui->getForm();
 
  481            $this->
insert(
"edpost", 
"create_mob", 
true);
 
  485        include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  486        if ($a_change_obj_ref != 
true) {
 
  489        $this->content_obj->createMediaObject();
 
  490        $media_obj = $this->content_obj->getMediaObject();
 
  492        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  495        if ($a_create_alias) {
 
  499            $this->content_obj->createAlias($this->pg_obj, $this->hier_id, $this->pc_id);
 
  500            $this->updated = $this->pg_obj->update();
 
  501            if ($this->updated === 
true) {
 
  502                $this->pg_obj->stripHierIDs();
 
  503                $this->pg_obj->addHierIDs();
 
  504                $ilCtrl->setParameter($this, 
"hier_id", $this->content_obj->readHierId());
 
  505                $ilCtrl->setParameter($this, 
"pc_id", $this->content_obj->readPCId());
 
  506                $this->content_obj->setHierId($this->content_obj->readHierId());
 
  507                $this->
setHierId($this->content_obj->readHierId());
 
  508                $this->content_obj->setPCId($this->content_obj->readPCId());
 
  510                $this->ctrl->redirectByClass(
"ilobjmediaobjectgui", 
"edit");
 
  517            if ($a_change_obj_ref == 
true) {
 
  518                $this->content_obj->updateObjectReference();
 
  519                $this->updated = $this->pg_obj->update();
 
  520                $this->ctrl->redirect($this, 
"editAlias");
 
  536        $tpl->setContent($this->form_gui->getHTML());
 
  547        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  556            $this->content_obj->getPcId()
 
  558        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  562        $this->form_gui->addItem(
$title);
 
  564            $this->lng->txt(
"cont_" . strtolower($std_item->getLocationType())),
 
  567        $this->form_gui->addItem($loc);
 
  569            $this->lng->txt(
"cont_format"),
 
  572        $this->form_gui->addItem(
$format);
 
  576        $orig_size = $std_item->getOriginalSize();
 
  577        $add_str = ($orig_size[
"width"] != 
"" && $orig_size[
"height"] != 
"")
 
  578            ? 
" (" . $orig_size[
"width"] . 
" x " . $orig_size[
"height"] . 
")" 
  582        $radio_size->addOption($op1);
 
  585        include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  587                " / " . 
$lng->txt(
"cont_height"), 
"st_width_height");
 
  588        $width_height->setConstrainProportions(
true);
 
  589        $op2->addSubItem($width_height);
 
  591        $radio_size->addOption($op2);
 
  592        $this->form_gui->addItem($radio_size);
 
  598        $op1->addSubItem($def_cap);
 
  600        $rad_caption->addOption($op1);
 
  603        $caption->setCols(30);
 
  604        $caption->setRows(2);
 
  605        $op2->addSubItem($caption);
 
  611        $rad_caption->addOption($op2);
 
  612        $this->form_gui->addItem($rad_caption);
 
  615        if (substr($std_item->getFormat(), 0, 5) == 
"image") {
 
  619            $op1->addSubItem($def_tr);
 
  624            $rad_tr->addOption($op1);
 
  625            $op2->addSubItem($tr);
 
  626            $rad_tr->addOption($op2);
 
  627            $this->form_gui->addItem($rad_tr);
 
  628            $rad_tr->setInfo(
$lng->txt(
"text_repr_info"));
 
  634                $std_item->getLocation(),
 
  635                $std_item->getFormat()
 
  637                $par = $std_item->getParameters();
 
  638                $def_str = ($par[
"autostart"] == 
"true")
 
  639                    ? 
" (" . 
$lng->txt(
"yes") . 
")" 
  640                    : 
" (" . 
$lng->txt(
"no") . 
")";
 
  642                    $lng->txt(
"cont_autostart"),
 
  643                    "st_derive_parameters" 
  646                $rad_auto->addOption($op1);
 
  649                $op2->addSubItem($auto);
 
  650                $rad_auto->addOption($op2);
 
  651                $this->form_gui->addItem($rad_auto);
 
  656                $op1->addSubItem($def_par);
 
  657                $rad_parameters->addOption($op1);
 
  662                $op2->addSubItem($par);
 
  663                $rad_parameters->addOption($op2);
 
  664                $this->form_gui->addItem($rad_parameters);
 
  669        if ($this->content_obj->getMediaObject()->hasFullScreenItem()) {
 
  674                $this->content_obj->getPcId()
 
  676            $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
  679            $fs_sec->setTitle(
$lng->txt(
"cont_fullscreen"));
 
  680            $this->form_gui->addItem($fs_sec);
 
  686            $radio_prop->addOption($op1);
 
  687            $op2 = 
new ilRadioOption($this->lng->txt(
"cont_" . strtolower($full_item->getLocationType())) . 
": " .
 
  688                $full_item->getLocation(), 
"y");
 
  689            $radio_prop->addOption($op2);
 
  690            $this->form_gui->addItem($radio_prop);
 
  694                $this->lng->txt(
"cont_format"),
 
  697            $this->form_gui->addItem(
$format);
 
  701            $fw_size = $std_item->getOriginalSize();
 
  702            $add_str = ($fw_size[
"width"] != 
"" && $fw_size[
"height"] != 
"")
 
  703                ? 
" (" . $fw_size[
"width"] . 
" x " . $fw_size[
"height"] . 
")" 
  707            $radio_size->addOption($op1);
 
  710            include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  712                    " / " . 
$lng->txt(
"cont_height"), 
"full_width_height");
 
  713            $width_height->setConstrainProportions(
true);
 
  714            $op2->addSubItem($width_height);
 
  716            $radio_size->addOption($op2);
 
  717            $this->form_gui->addItem($radio_size);
 
  723            $op1->addSubItem($def_cap);
 
  725            $rad_caption->addOption($op1);
 
  728            $caption->setCols(30);
 
  729            $caption->setRows(2);
 
  730            $op2->addSubItem($caption);
 
  736            $rad_caption->addOption($op2);
 
  737            $this->form_gui->addItem($rad_caption);
 
  740            if (substr($full_item->getFormat(), 0, 5) == 
"image") {
 
  744                $op1->addSubItem($def_tr);
 
  749                $rad_tr->addOption($op1);
 
  750                $op2->addSubItem($tr);
 
  751                $rad_tr->addOption($op2);
 
  752                $this->form_gui->addItem($rad_tr);
 
  753                $rad_tr->setInfo(
$lng->txt(
"text_repr_info"));
 
  759                    $full_item->getLocation(),
 
  760                    $full_item->getFormat()
 
  762                    $par = $full_item->getParameters();
 
  763                    $def_str = ($par[
"autostart"] == 
"true")
 
  764                        ? 
" (" . 
$lng->txt(
"yes") . 
")" 
  765                        : 
" (" . 
$lng->txt(
"no") . 
")";
 
  767                        $lng->txt(
"cont_autostart"),
 
  768                        "full_derive_parameters" 
  771                    $rad_auto->addOption($op1);
 
  774                    $op2->addSubItem($auto);
 
  775                    $rad_auto->addOption($op2);
 
  776                    $this->form_gui->addItem($rad_auto);
 
  781                    $op1->addSubItem($def_par);
 
  782                    $rad_parameters->addOption($op1);
 
  787                    $op2->addSubItem($par);
 
  788                    $rad_parameters->addOption($op2);
 
  789                    $this->form_gui->addItem($rad_parameters);
 
  794        $this->form_gui->setTitle(
$lng->txt(
"cont_edit_mob_alias_prop"));
 
  795        $this->form_gui->addCommandButton(
"saveAliasProperties", 
$lng->txt(
"save"));
 
  797        if (
$lm_set->get(
"replace_mob_feature")) {
 
  798            $this->form_gui->addCommandButton(
"changeObjectReference", 
$lng->txt(
"cont_change_object_reference"));
 
  800        $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  815            $this->content_obj->getPcId()
 
  817        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  819        $values[
"title"] = $this->content_obj->getMediaObject()->getTitle();
 
  820        $values[
"st_location"] = $std_item->getLocation();
 
  821        $values[
"st_format"] = $std_item->getFormat();
 
  824        $values[
"st_width_height"][
"width"] = $std_alias_item->getWidth();
 
  825        $values[
"st_width_height"][
"height"] = $std_alias_item->getHeight();
 
  826        $values[
"st_width_height"][
"constr_prop"] = 
true;
 
  829        $values[
"st_caption"] = $std_alias_item->getCaption();
 
  830        if (trim($std_item->getCaption()) == 
"") {
 
  831            $values[
"def_caption"] = 
"<i>" . 
$lng->txt(
"cont_no_caption") . 
"</i>";
 
  833            $values[
"def_caption"] = $std_item->getCaption();
 
  837        $values[
"st_text_representation"] = $std_alias_item->getTextRepresentation();
 
  838        if (trim($std_item->getTextRepresentation()) == 
"") {
 
  839            $values[
"def_text_representation"] = 
"<i>" . 
$lng->txt(
"cont_no_text") . 
"</i>";
 
  841            $values[
"def_text_representation"] = $std_item->getTextRepresentation();
 
  846            $std_item->getLocation(),
 
  847            $std_item->getFormat()
 
  849            $par = $std_alias_item->getParameters();
 
  850            if ($par[
"autostart"] == 
"true") {
 
  851                $values[
"st_autostart"] = 
true;
 
  854            $values[
"st_parameters"] = $std_alias_item->getParameterString();
 
  858        $values[
"st_derive_size"] = $std_alias_item->definesSize()
 
  861        if ($values[
"st_derive_size"] == 
"y") {
 
  862            $values[
"st_width_height"][
"width"] = $std_item->getWidth();
 
  863            $values[
"st_width_height"][
"height"] = $std_item->getHeight();
 
  865        $values[
"st_derive_caption"] = $std_alias_item->definesCaption()
 
  868        $values[
"st_derive_text_representation"] = $std_alias_item->definesTextRepresentation()
 
  871        $values[
"st_derive_parameters"] = $std_alias_item->definesParameters()
 
  874        if (trim($std_item->getParameterString()) == 
"") {
 
  875            $values[
"def_parameters"] = 
"<i>" . 
$lng->txt(
"cont_no_parameters") . 
"</i>";
 
  877            $values[
"def_parameters"] = $std_item->getParameterString();
 
  881        if ($this->content_obj->getMediaObject()->hasFullScreenItem()) {
 
  886                $this->content_obj->getPcId()
 
  888            $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
  890            $values[
"fullscreen"] = 
"n";
 
  891            if ($full_alias_item->exists()) {
 
  892                $values[
"fullscreen"] = 
"y";
 
  895            $values[
"full_location"] = $full_item->getLocation();
 
  896            $values[
"full_format"] = $full_item->getFormat();
 
  897            $values[
"full_width_height"][
"width"] = $full_alias_item->getWidth();
 
  898            $values[
"full_width_height"][
"height"] = $full_alias_item->getHeight();
 
  899            $values[
"full_width_height"][
"constr_prop"] = 
true;
 
  900            $values[
"full_caption"] = $full_alias_item->getCaption();
 
  901            if (trim($full_item->getCaption()) == 
"") {
 
  902                $values[
"full_def_caption"] = 
"<i>" . 
$lng->txt(
"cont_no_caption") . 
"</i>";
 
  904                $values[
"full_def_caption"] = $full_item->getCaption();
 
  906            $values[
"full_text_representation"] = $full_alias_item->getTextRepresentation();
 
  907            if (trim($full_item->getTextRepresentation()) == 
"") {
 
  908                $values[
"full_def_text_representation"] = 
"<i>" . 
$lng->txt(
"cont_no_text") . 
"</i>";
 
  910                $values[
"full_def_text_representation"] = $full_item->getTextRepresentation();
 
  912            $values[
"full_parameters"] = $full_alias_item->getParameterString();
 
  913            $values[
"full_derive_size"] = $full_alias_item->definesSize()
 
  916            if ($values[
"full_derive_size"] == 
"y") {
 
  917                $values[
"full_width_height"][
"width"] = $full_item->getWidth();
 
  918                $values[
"full_width_height"][
"height"] = $full_item->getHeight();
 
  920            $values[
"full_derive_caption"] = $full_alias_item->definesCaption()
 
  923            $values[
"full_derive_text_representation"] = $full_alias_item->definesTextRepresentation()
 
  929                $full_item->getLocation(),
 
  930                $full_item->getFormat()
 
  932                $par = $full_alias_item->getParameters();
 
  933                if ($par[
"autostart"] == 
"true") {
 
  934                    $values[
"full_autostart"] = 
true;
 
  937                $values[
"full_parameters"] = $full_alias_item->getParameterString();
 
  940            $values[
"full_derive_parameters"] = $full_alias_item->definesParameters()
 
  943            if (trim($full_item->getParameterString()) == 
"") {
 
  944                $values[
"full_def_parameters"] = 
"<i>" . 
$lng->txt(
"cont_no_parameters") . 
"</i>";
 
  946                $values[
"full_def_parameters"] = $full_item->getParameterString();
 
  950        $this->form_gui->setValuesByArray($values);
 
  962            $this->content_obj->getPcId()
 
  968            $this->content_obj->getPcId()
 
  970        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  971        $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
  974        if (
$_POST[
"st_derive_size"] == 
"y") {
 
  975            $std_alias_item->deriveSize();
 
  982        if (
$_POST[
"st_derive_caption"] == 
"y") {
 
  983            $std_alias_item->deriveCaption();
 
  989        if (
$_POST[
"st_derive_text_representation"] == 
"y") {
 
  990            $std_alias_item->deriveTextRepresentation();
 
  996        if (
$_POST[
"st_derive_parameters"] == 
"y") {
 
  997            $std_alias_item->deriveParameters();
 
 1000                $std_item->getLocation(),
 
 1001                $std_item->getFormat()
 
 1003                if (
$_POST[
"st_autostart"]) {
 
 1013        if ($this->content_obj->getMediaObject()->hasFullscreenItem()) {
 
 1014            if (
$_POST[
"fullscreen"] ==  
"y") {
 
 1015                if (!$full_alias_item->exists()) {
 
 1016                    $full_alias_item->insert();
 
 1020                if (
$_POST[
"full_derive_size"] == 
"y") {
 
 1021                    $full_alias_item->deriveSize();
 
 1028                if (
$_POST[
"full_derive_caption"] == 
"y") {
 
 1029                    $full_alias_item->deriveCaption();
 
 1035                if (
$_POST[
"full_derive_text_representation"] == 
"y") {
 
 1036                    $full_alias_item->deriveTextRepresentation();
 
 1042                if (
$_POST[
"full_derive_parameters"] == 
"y") {
 
 1043                    $full_alias_item->deriveParameters();
 
 1046                        $full_item->getLocation(),
 
 1047                        $full_item->getFormat()
 
 1049                        if (
$_POST[
"full_autostart"]) {
 
 1059                if ($full_alias_item->exists()) {
 
 1060                    $full_alias_item->delete();
 
 1065        $this->updated = $this->pg_obj->update();
 
 1066        if ($this->updated === 
true) {
 
 1068            $this->ctrl->redirect($this, 
"editAlias");
 
 1069            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1071            $this->pg_obj->addHierIDs();
 
 1083        $ilUser->addObjectToClipboard($this->content_obj->getMediaObject()->getId(), $this->content_obj->getMediaObject()->getType(), $this->content_obj->getMediaObject()->getTitle());
 
 1085        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1097            $this->content_obj->getPcId()
 
 1099        $std_alias_item->setHorizontalAlign(
"Center");
 
 1100        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1101        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1113            $this->content_obj->getPcId()
 
 1115        $std_alias_item->setHorizontalAlign(
"Left");
 
 1116        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1117        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1129            $this->content_obj->getPcId()
 
 1131        $std_alias_item->setHorizontalAlign(
"Right");
 
 1132        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1133        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1145            $this->content_obj->getPcId()
 
 1147        $std_alias_item->setHorizontalAlign(
"LeftFloat");
 
 1148        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1149        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1161            $this->content_obj->getPcId()
 
 1163        $std_alias_item->setHorizontalAlign(
"RightFloat");
 
 1164        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1165        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1176        if (count($chars) > 1 ||
 
 1177            ($this->content_obj->getClass() != 
"" && $this->content_obj->getClass() != 
"Media")) {
 
 1195        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1198        $form->setTitle($this->lng->txt(
"cont_edit_style"));
 
 1201        require_once(
"./Services/Form/classes/class.ilAdvSelectInputGUI.php");
 
 1203            $this->lng->txt(
"cont_characteristic"),
 
 1208        if (is_object($this->content_obj)) {
 
 1209            if ($chars[$a_seleted_value] == 
"" && ($this->content_obj->getClass() != 
"")) {
 
 1210                $chars = array_merge(
 
 1211                    array($this->content_obj->getClass() => $this->content_obj->getClass()),
 
 1217        $selected = $this->content_obj->getClass();
 
 1218        if ($selected == 
"") {
 
 1219            $selected = 
"MediaContainer";
 
 1222        foreach ($chars as $k => $char) {
 
 1223            $html = 
'<div class="ilCOPgEditStyleSelectionItem">' .
 
 1225            $char_prop->addOption($k, $char, 
$html);
 
 1228        $char_prop->setValue($selected);
 
 1229        $form->addItem($char_prop);
 
 1232        $form->addCommandButton(
"saveStyle", 
$lng->txt(
"save"));
 
 1244        $this->content_obj->setClass(
$_POST[
"characteristic"]);
 
 1245        $this->updated = $this->pg_obj->update();
 
 1246        if ($this->updated === 
true) {
 
 1247            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1249            $this->pg_obj->addHierIDs();
 
 1260    public function getTabs(&$tab_gui, $a_create = 
false, $a_change_obj_ref = 
false)
 
 1269                    $ilCtrl->getLinkTarget($this, 
"editStyle"),
 
 1276                "cont_mob_inst_prop",
 
 1277                $ilCtrl->getLinkTarget($this, 
"editAlias"),
 
 1283                $st_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
 1284                if (is_object($st_item)) {
 
 1285                    $format = $st_item->getFormat();
 
 1286                    if (substr(
$format, 0, 5) == 
"image" && !is_int(strpos(
$format, 
"svg"))) {
 
 1288                            "cont_inst_map_areas",
 
 1289                            $ilCtrl->getLinkTargetByClass(
"ilpcimagemapeditorgui", 
"editMapAreas"),
 
 1291                            "ilpcimagemapeditorgui" 
 1297            if ($a_change_obj_ref) {
 
 1298                $cmd = 
"changeObjectReference";
 
 1303            $ilCtrl->setParameter($this, 
"subCmd", 
"insertNew");
 
 1304            $ilTabs->addSubTabTarget(
 
 1306                $ilCtrl->getLinkTarget($this, $cmd),
 
 1310            $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
 1311            $ilTabs->addSubTabTarget(
 
 1312                "cont_mob_from_media_pool",
 
 1313                $ilCtrl->getLinkTarget($this, $cmd),
 
 1316            $ilCtrl->setParameter($this, 
"subCmd", 
"");
 
An exception for terminatinating execution or to throw for unit testing.
This class represents a non editable value in a property form.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
User interface class for page content map editor.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
getHierId()
get hierarchical id in dom object
getCharacteristicsOfCurrentStyle($a_type)
Get characteristics of current style.
displayValidationError()
display validation errors
getCharacteristics()
Get characteristics.
setCharacteristics($a_chars)
Set Characteristics.
setHierId($a_hier_id)
get hierarchical id in dom object
Select media pool for adding objects into pages.
This class represents an option in a radio group.
This class represents a text area property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static extractParameterString($a_parstr)
extracts parameter value pairs from a string into an array
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_POST['submit'])) $form