4require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
    5require_once(
"./Services/COPage/classes/class.ilMediaAliasItem.php");
 
    6require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
   61    public function __construct($a_pg_obj, $a_content_obj, $a_hier_id = 0, $a_pc_id = 
"")
 
   65        $this->tpl = 
$DIC[
"tpl"];
 
   66        $this->lng = 
$DIC->language();
 
   67        $this->tabs = 
$DIC->tabs();
 
   68        $this->access = 
$DIC->access();
 
   69        $this->toolbar = 
$DIC->toolbar();
 
   70        $this->
user = $DIC->user();
 
   72        $this->
ui = $DIC->ui();
 
   74        $this->pool_view = 
"folder";
 
   75        if (in_array(
$_GET[
"pool_view"], array(
"folder", 
"all"))) {
 
   76            $this->pool_view = 
$_GET[
"pool_view"];
 
   81        $this->ctrl->saveParameter($this, 
"pool_view");
 
   89            "MediaContainer" => $this->lng->txt(
"cont_Media"),
 
   90            "MediaContainerMax50" => 
"MediaContainerMax50",
 
   91            "MediaContainerFull100" => 
"MediaContainerFull100",
 
   92            "MediaContainerHighlighted" => 
"MediaContainerHighlighted",
 
   93            "MediaContainerSeparated" => 
"MediaContainerSeparated" 
  104        $this->sub_cmd = $a_val;
 
  120        $this->header = $a_title;
 
  135        $this->enabledmapareas = $a_enabledmapareas;
 
  145        return $this->enabledmapareas;
 
  160        $next_class = $this->ctrl->getNextClass($this);
 
  163        $cmd = $this->ctrl->getCmd();
 
  164        if (is_object($this->content_obj)) {
 
  167            $this->
getTabs($this->tabs_gui);
 
  169            $mob = $this->content_obj->getMediaObject();
 
  170            if (is_object($mob)) {
 
  171                $tpl->setTitle(
$lng->txt(
"mob") . 
": " .
 
  172                    $this->content_obj->getMediaObject()->getTitle());
 
  173                $mob_gui = 
new ilObjMediaObjectGUI(
"", $this->content_obj->getMediaObject()->getId(), 
false, 
false);
 
  174                $mob_gui->setBackTitle($this->page_back_title);
 
  176                $mob_gui->getTabs($this->tabs_gui);
 
  181        switch ($next_class) {
 
  182            case "ilobjmediaobjectgui":
 
  183                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  186                $this->tpl->setTitle($this->lng->txt(
"mob") . 
": " .
 
  187                    $this->content_obj->getMediaObject()->getTitle());
 
  188                $mob_gui = 
new ilObjMediaObjectGUI(
"", $this->content_obj->getMediaObject()->getId(), 
false, 
false);
 
  189                $mob_gui->setBackTitle($this->page_back_title);
 
  191                $ret = $this->ctrl->forwardCommand($mob_gui);
 
  195            case "ilpcimagemapeditorgui":
 
  196                require_once(
"./Services/COPage/classes/class.ilPCImageMapEditorGUI.php");
 
  197                $ilTabs->setTabActive(
"cont_inst_map_areas");
 
  202                $ret = $this->ctrl->forwardCommand($image_map_edit);
 
  208                $ret = $this->$cmd();
 
  218    public function insert($a_post_cmd = 
"edpost", $a_submit_cmd = 
"create_mob", $a_input_error = 
false)
 
  225        if (
$_GET[
"subCmd"] == 
"insertNew") {
 
  226            $_SESSION[
"cont_media_insert"] = 
"insertNew";
 
  228        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  229            $_SESSION[
"cont_media_insert"] = 
"insertFromPool";
 
  232        if ((
$_GET[
"subCmd"] == 
"") && 
$_SESSION[
"cont_media_insert"] != 
"") {
 
  236        switch (
$_GET[
"subCmd"]) {
 
  237            case "insertFromPool":
 
  241            case "poolSelection":
 
  252                $ilTabs->setSubTabActive(
"cont_new_mob");
 
  254                include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  255                if ($a_input_error) {
 
  259                    $mob_gui->initForm(
"create");
 
  260                    $form = $mob_gui->getForm();
 
  262                $form->setFormAction(
$ilCtrl->getFormAction($this, 
"create_mob"));
 
  263                $form->clearCommandButtons();
 
  264                $form->addCommandButton(
"create_mob", 
$lng->txt(
"save"));
 
  265                $form->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  269                $tpl->setContent($form->getHTML());
 
  284        if (
$_GET[
"subCmd"] == 
"insertNew") {
 
  285            $_SESSION[
"cont_media_insert"] = 
"insertNew";
 
  287        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  288            $_SESSION[
"cont_media_insert"] = 
"insertFromPool";
 
  291        if ((
$_GET[
"subCmd"] == 
"") && 
$_SESSION[
"cont_media_insert"] != 
"") {
 
  295        switch (
$_GET[
"subCmd"]) {
 
  296            case "insertFromPool":
 
  300            case "poolSelection":
 
  310                $ilCtrl->setParameter($this, 
"subCmd", 
"changeObjectReference");
 
  311                $this->
getTabs($ilTabs, 
true, 
true);
 
  312                $ilTabs->setSubTabActive(
"cont_new_mob");
 
  317                $mob_gui->initForm(
"create");
 
  318                $form = $mob_gui->getForm();
 
  319                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  320                $form->clearCommandButtons();
 
  321                $form->addCommandButton(
"createNewObjectReference", 
$lng->txt(
"save"));
 
  322                $form->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  323                $this->tpl->setContent($form->getHTML());
 
  337            $this->content_obj->getPcId()
 
  339        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  342        if (($std_alias_item->getWidth() != 
"" && $std_alias_item->getHeight() != 
"")) {
 
  345        if ($std_alias_item->getWidth() == 
"" && $std_alias_item->getHeight() == 
"" 
  346            && $std_item->getWidth() != 
"" && $std_item->getHeight() != 
"") {
 
  367        if (
$_SESSION[
"cont_media_pool"] != 
"" &&
 
  368            $ilAccess->checkAccess(
"write", 
"", 
$_SESSION[
"cont_media_pool"])
 
  374            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  375            if ($a_change_obj_ref) {
 
  377                    $lng->txt(
"cont_switch_to_media_pool"),
 
  378                    $ilCtrl->getLinkTarget($this, 
"changeObjectReference")
 
  382                    $lng->txt(
"cont_switch_to_media_pool"),
 
  383                    $ilCtrl->getLinkTarget($this, 
"insert")
 
  386            $ilCtrl->setParameter($this, 
"subCmd", 
"");
 
  390            $tcmd = ($a_change_obj_ref)
 
  391                ? 
"changeObjectReference" 
  393            $lng->loadLanguageModule(
"mep");
 
  394            $ilCtrl->setParameter($this, 
"pool_view", 
"folder");
 
  395            $actions[
$lng->txt(
"folders")] = 
$ilCtrl->getLinkTarget($this, $tcmd);
 
  396            $ilCtrl->setParameter($this, 
"pool_view", 
"all");
 
  397            $actions[
$lng->txt(
"mep_all_mobs")] = 
$ilCtrl->getLinkTarget($this, $tcmd);
 
  398            $ilCtrl->setParameter($this, 
"pool_view", $this->pool_view);
 
  399            $aria_label = 
$lng->txt(
"cont_change_pool_view");
 
  400            $view_control = 
$f->viewControl()->mode($actions, $aria_label)->withActive(($this->pool_view == 
"folder")
 
  401                ? 
$lng->txt(
"folders") : 
$lng->txt(
"mep_all_mobs"));
 
  403            $tb->addComponent($view_control);
 
  405            $html = $tb->getHTML();
 
  407            $this->
getTabs($ilTabs, 
true, $a_change_obj_ref);
 
  408            $ilTabs->setSubTabActive(
"cont_mob_from_media_pool");
 
  413            include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
 
  414            include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
 
  416            $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  417            $tcmd = ($a_change_obj_ref)
 
  418                ? 
"changeObjectReference" 
  420            $tmode = ($a_change_obj_ref)
 
  425            if ($this->
getSubCmd() == 
"applyFilter") {
 
  432                    $this->pool_view == 
"all" 
  434                $mpool_table->resetOffset();
 
  435                $mpool_table->writeFilterToSession();
 
  437            if ($this->
getSubCmd() == 
"resetFilter") {
 
  444                    $this->pool_view == 
"all" 
  446                $mpool_table->resetOffset();
 
  447                $mpool_table->resetFilter();
 
  455                $this->pool_view == 
"all" 
  458            $html .= $mpool_table->getHTML();
 
  460            $tpl->setContent($html);
 
  474        $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  475        if ($a_change_obj_ref) {
 
  476            $ilCtrl->redirect($this, 
"changeObjectReference");
 
  478            $ilCtrl->redirect($this, 
"insert");
 
  491        $this->
getTabs($ilTabs, 
true, $a_change_obj_ref);
 
  492        $ilTabs->setSubTabActive(
"cont_mob_from_media_pool");
 
  494        include_once 
"./Services/COPage/classes/class.ilPoolSelectorGUI.php";
 
  496        if ($a_change_obj_ref) {
 
  497            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  498            $exp = 
new ilPoolSelectorGUI($this, 
"changeObjectReference", $this, 
"changeObjectReference");
 
  500            $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  505        $exp->setTypeWhiteList(array(
"root", 
"cat", 
"grp", 
"fold", 
"crs", 
"mep"));
 
  506        $exp->setClickableTypes(array(
'mep'));
 
  508        if (!$exp->handleCommand()) {
 
  509            $tpl->setContent($exp->getHTML());
 
  520        $this->
create(
false, 
true);
 
  531        if (is_array(
$_POST[
"id"]) && count(
$_POST[
"id"]) == 1) {
 
  532            include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  533            include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  535            $this->content_obj->readMediaObject($fid);
 
  536            $this->content_obj->updateObjectReference();
 
  537            $this->updated = $this->pg_obj->update();
 
  540            $ilCtrl->redirect($this, 
"changeObjectReference");
 
  542        $ilCtrl->redirect($this, 
"editAlias");
 
  548    public function &
create($a_create_alias = 
true, $a_change_obj_ref = 
false)
 
  553        if (
$_GET[
"subCmd"] == 
"insertFromPool") {
 
  554            if (is_array(
$_POST[
"id"])) {
 
  556                    include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  558                    include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  560                    $this->content_obj->readMediaObject($fid);
 
  561                    $this->content_obj->createAlias($this->pg_obj, 
$_GET[
"hier_id"], $this->pc_id);
 
  563                $this->updated = $this->pg_obj->update();
 
  566            $ilCtrl->returnToParent($this);
 
  571        $mob_gui->initForm(
"create");
 
  573        if (!$mob_gui->checkFormInput()) {
 
  574            $this->form = $mob_gui->getForm();
 
  575            $this->
insert(
"edpost", 
"create_mob", 
true);
 
  579        include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  580        if ($a_change_obj_ref != 
true) {
 
  583        $this->content_obj->createMediaObject();
 
  584        $media_obj = $this->content_obj->getMediaObject();
 
  586        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
  589        if ($a_create_alias) {
 
  593            $this->content_obj->createAlias($this->pg_obj, $this->hier_id, $this->pc_id);
 
  594            $this->updated = $this->pg_obj->update();
 
  595            if ($this->updated === 
true) {
 
  596                $this->pg_obj->stripHierIDs();
 
  597                $this->pg_obj->addHierIDs();
 
  598                $ilCtrl->setParameter($this, 
"hier_id", $this->content_obj->readHierId());
 
  599                $ilCtrl->setParameter($this, 
"pc_id", $this->content_obj->readPCId());
 
  600                $this->content_obj->setHierId($this->content_obj->readHierId());
 
  601                $this->
setHierId($this->content_obj->readHierId());
 
  602                $this->content_obj->setPCId($this->content_obj->readPCId());
 
  603                ilUtil::sendSuccess(
$lng->txt(
"saved_media_object"), 
true);
 
  604                $this->ctrl->redirectByClass(
"ilobjmediaobjectgui", 
"edit");
 
  611            if ($a_change_obj_ref == 
true) {
 
  612                $this->content_obj->updateObjectReference();
 
  613                $this->updated = $this->pg_obj->update();
 
  614                $this->ctrl->redirect($this, 
"editAlias");
 
  630        $tpl->setContent($this->form_gui->getHTML());
 
  641        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  650            $this->content_obj->getPcId()
 
  652        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  656        $this->form_gui->addItem($title);
 
  658            $this->lng->txt(
"cont_" . strtolower($std_item->getLocationType())),
 
  661        $this->form_gui->addItem($loc);
 
  663            $this->lng->txt(
"cont_format"),
 
  666        $this->form_gui->addItem(
$format);
 
  670        $orig_size = $std_item->getOriginalSize();
 
  671        $add_str = ($orig_size[
"width"] != 
"" && $orig_size[
"height"] != 
"")
 
  672            ? 
" (" . $orig_size[
"width"] . 
" x " . $orig_size[
"height"] . 
")" 
  676        $radio_size->addOption($op1);
 
  679        include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  681                " / " . 
$lng->txt(
"cont_height"), 
"st_width_height");
 
  682        $width_height->setConstrainProportions(
true);
 
  683        $op2->addSubItem($width_height);
 
  685        $radio_size->addOption($op2);
 
  686        $this->form_gui->addItem($radio_size);
 
  692        $op1->addSubItem($def_cap);
 
  694        $rad_caption->addOption($op1);
 
  697        $caption->setCols(30);
 
  698        $caption->setRows(2);
 
  699        $op2->addSubItem($caption);
 
  705        $rad_caption->addOption($op2);
 
  706        $this->form_gui->addItem($rad_caption);
 
  709        if (substr($std_item->getFormat(), 0, 5) == 
"image") {
 
  713            $op1->addSubItem($def_tr);
 
  718            $rad_tr->addOption($op1);
 
  719            $op2->addSubItem($tr);
 
  720            $rad_tr->addOption($op2);
 
  721            $this->form_gui->addItem($rad_tr);
 
  722            $rad_tr->setInfo(
$lng->txt(
"text_repr_info"));
 
  728                $std_item->getLocation(),
 
  729                $std_item->getFormat()
 
  731                $par = $std_item->getParameters();
 
  732                $def_str = ($par[
"autostart"] == 
"true")
 
  733                    ? 
" (" . 
$lng->txt(
"yes") . 
")" 
  734                    : 
" (" . 
$lng->txt(
"no") . 
")";
 
  736                    $lng->txt(
"cont_autostart"),
 
  737                    "st_derive_parameters" 
  740                $rad_auto->addOption($op1);
 
  743                $op2->addSubItem($auto);
 
  744                $rad_auto->addOption($op2);
 
  745                $this->form_gui->addItem($rad_auto);
 
  750                $op1->addSubItem($def_par);
 
  751                $rad_parameters->addOption($op1);
 
  756                $op2->addSubItem($par);
 
  757                $rad_parameters->addOption($op2);
 
  758                $this->form_gui->addItem($rad_parameters);
 
  763        if ($this->content_obj->getMediaObject()->hasFullScreenItem()) {
 
  768                $this->content_obj->getPcId()
 
  770            $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
  773            $fs_sec->setTitle(
$lng->txt(
"cont_fullscreen"));
 
  774            $this->form_gui->addItem($fs_sec);
 
  780            $radio_prop->addOption($op1);
 
  781            $op2 = 
new ilRadioOption($this->lng->txt(
"cont_" . strtolower($full_item->getLocationType())) . 
": " .
 
  782                $full_item->getLocation(), 
"y");
 
  783            $radio_prop->addOption($op2);
 
  784            $this->form_gui->addItem($radio_prop);
 
  788                $this->lng->txt(
"cont_format"),
 
  791            $this->form_gui->addItem(
$format);
 
  795            $fw_size = $std_item->getOriginalSize();
 
  796            $add_str = ($fw_size[
"width"] != 
"" && $fw_size[
"height"] != 
"")
 
  797                ? 
" (" . $fw_size[
"width"] . 
" x " . $fw_size[
"height"] . 
")" 
  801            $radio_size->addOption($op1);
 
  804            include_once(
"./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php");
 
  806                    " / " . 
$lng->txt(
"cont_height"), 
"full_width_height");
 
  807            $width_height->setConstrainProportions(
true);
 
  808            $op2->addSubItem($width_height);
 
  810            $radio_size->addOption($op2);
 
  811            $this->form_gui->addItem($radio_size);
 
  817            $op1->addSubItem($def_cap);
 
  819            $rad_caption->addOption($op1);
 
  822            $caption->setCols(30);
 
  823            $caption->setRows(2);
 
  824            $op2->addSubItem($caption);
 
  830            $rad_caption->addOption($op2);
 
  831            $this->form_gui->addItem($rad_caption);
 
  834            if (substr($full_item->getFormat(), 0, 5) == 
"image") {
 
  838                $op1->addSubItem($def_tr);
 
  843                $rad_tr->addOption($op1);
 
  844                $op2->addSubItem($tr);
 
  845                $rad_tr->addOption($op2);
 
  846                $this->form_gui->addItem($rad_tr);
 
  847                $rad_tr->setInfo(
$lng->txt(
"text_repr_info"));
 
  853                    $full_item->getLocation(),
 
  854                    $full_item->getFormat()
 
  856                    $par = $full_item->getParameters();
 
  857                    $def_str = ($par[
"autostart"] == 
"true")
 
  858                        ? 
" (" . 
$lng->txt(
"yes") . 
")" 
  859                        : 
" (" . 
$lng->txt(
"no") . 
")";
 
  861                        $lng->txt(
"cont_autostart"),
 
  862                        "full_derive_parameters" 
  865                    $rad_auto->addOption($op1);
 
  868                    $op2->addSubItem($auto);
 
  869                    $rad_auto->addOption($op2);
 
  870                    $this->form_gui->addItem($rad_auto);
 
  875                    $op1->addSubItem($def_par);
 
  876                    $rad_parameters->addOption($op1);
 
  881                    $op2->addSubItem($par);
 
  882                    $rad_parameters->addOption($op2);
 
  883                    $this->form_gui->addItem($rad_parameters);
 
  888        $this->form_gui->setTitle(
$lng->txt(
"cont_edit_mob_alias_prop"));
 
  889        $this->form_gui->addCommandButton(
"saveAliasProperties", 
$lng->txt(
"save"));
 
  891        if (
$lm_set->get(
"replace_mob_feature")) {
 
  892            $this->form_gui->addCommandButton(
"changeObjectReference", 
$lng->txt(
"cont_change_object_reference"));
 
  894        $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  909            $this->content_obj->getPcId()
 
  911        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
  913        $values[
"title"] = $this->content_obj->getMediaObject()->getTitle();
 
  914        $values[
"st_location"] = $std_item->getLocation();
 
  915        $values[
"st_format"] = $std_item->getFormat();
 
  918        $values[
"st_width_height"][
"width"] = $std_alias_item->getWidth();
 
  919        $values[
"st_width_height"][
"height"] = $std_alias_item->getHeight();
 
  920        $values[
"st_width_height"][
"constr_prop"] = 
true;
 
  923        $values[
"st_caption"] = $std_alias_item->getCaption();
 
  924        if (trim($std_item->getCaption()) == 
"") {
 
  925            $values[
"def_caption"] = 
"<i>" . 
$lng->txt(
"cont_no_caption") . 
"</i>";
 
  927            $values[
"def_caption"] = $std_item->getCaption();
 
  931        $values[
"st_text_representation"] = $std_alias_item->getTextRepresentation();
 
  932        if (trim($std_item->getTextRepresentation()) == 
"") {
 
  933            $values[
"def_text_representation"] = 
"<i>" . 
$lng->txt(
"cont_no_text") . 
"</i>";
 
  935            $values[
"def_text_representation"] = $std_item->getTextRepresentation();
 
  940            $std_item->getLocation(),
 
  941            $std_item->getFormat()
 
  943            $par = $std_alias_item->getParameters();
 
  944            if ($par[
"autostart"] == 
"true") {
 
  945                $values[
"st_autostart"] = 
true;
 
  948            $values[
"st_parameters"] = $std_alias_item->getParameterString();
 
  952        $values[
"st_derive_size"] = $std_alias_item->definesSize()
 
  955        if ($values[
"st_derive_size"] == 
"y") {
 
  956            $values[
"st_width_height"][
"width"] = $std_item->getWidth();
 
  957            $values[
"st_width_height"][
"height"] = $std_item->getHeight();
 
  959        $values[
"st_derive_caption"] = $std_alias_item->definesCaption()
 
  962        $values[
"st_derive_text_representation"] = $std_alias_item->definesTextRepresentation()
 
  965        $values[
"st_derive_parameters"] = $std_alias_item->definesParameters()
 
  968        if (trim($std_item->getParameterString()) == 
"") {
 
  969            $values[
"def_parameters"] = 
"<i>" . 
$lng->txt(
"cont_no_parameters") . 
"</i>";
 
  971            $values[
"def_parameters"] = $std_item->getParameterString();
 
  975        if ($this->content_obj->getMediaObject()->hasFullScreenItem()) {
 
  980                $this->content_obj->getPcId()
 
  982            $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
  984            $values[
"fullscreen"] = 
"n";
 
  985            if ($full_alias_item->exists()) {
 
  986                $values[
"fullscreen"] = 
"y";
 
  989            $values[
"full_location"] = $full_item->getLocation();
 
  990            $values[
"full_format"] = $full_item->getFormat();
 
  991            $values[
"full_width_height"][
"width"] = $full_alias_item->getWidth();
 
  992            $values[
"full_width_height"][
"height"] = $full_alias_item->getHeight();
 
  993            $values[
"full_width_height"][
"constr_prop"] = 
true;
 
  994            $values[
"full_caption"] = $full_alias_item->getCaption();
 
  995            if (trim($full_item->getCaption()) == 
"") {
 
  996                $values[
"full_def_caption"] = 
"<i>" . 
$lng->txt(
"cont_no_caption") . 
"</i>";
 
  998                $values[
"full_def_caption"] = $full_item->getCaption();
 
 1000            $values[
"full_text_representation"] = $full_alias_item->getTextRepresentation();
 
 1001            if (trim($full_item->getTextRepresentation()) == 
"") {
 
 1002                $values[
"full_def_text_representation"] = 
"<i>" . 
$lng->txt(
"cont_no_text") . 
"</i>";
 
 1004                $values[
"full_def_text_representation"] = $full_item->getTextRepresentation();
 
 1006            $values[
"full_parameters"] = $full_alias_item->getParameterString();
 
 1007            $values[
"full_derive_size"] = $full_alias_item->definesSize()
 
 1010            if ($values[
"full_derive_size"] == 
"y") {
 
 1011                $values[
"full_width_height"][
"width"] = $full_item->getWidth();
 
 1012                $values[
"full_width_height"][
"height"] = $full_item->getHeight();
 
 1014            $values[
"full_derive_caption"] = $full_alias_item->definesCaption()
 
 1017            $values[
"full_derive_text_representation"] = $full_alias_item->definesTextRepresentation()
 
 1023                $full_item->getLocation(),
 
 1024                $full_item->getFormat()
 
 1026                $par = $full_alias_item->getParameters();
 
 1027                if ($par[
"autostart"] == 
"true") {
 
 1028                    $values[
"full_autostart"] = 
true;
 
 1031                $values[
"full_parameters"] = $full_alias_item->getParameterString();
 
 1034            $values[
"full_derive_parameters"] = $full_alias_item->definesParameters()
 
 1037            if (trim($full_item->getParameterString()) == 
"") {
 
 1038                $values[
"full_def_parameters"] = 
"<i>" . 
$lng->txt(
"cont_no_parameters") . 
"</i>";
 
 1040                $values[
"full_def_parameters"] = $full_item->getParameterString();
 
 1044        $this->form_gui->setValuesByArray($values);
 
 1056            $this->content_obj->getPcId()
 
 1062            $this->content_obj->getPcId()
 
 1064        $std_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
 1065        $full_item = $this->content_obj->getMediaObject()->getMediaItem(
"Fullscreen");
 
 1068        if (
$_POST[
"st_derive_size"] == 
"y") {
 
 1069            $std_alias_item->deriveSize();
 
 1076        if (
$_POST[
"st_derive_caption"] == 
"y") {
 
 1077            $std_alias_item->deriveCaption();
 
 1083        if (
$_POST[
"st_derive_text_representation"] == 
"y") {
 
 1084            $std_alias_item->deriveTextRepresentation();
 
 1090        if (
$_POST[
"st_derive_parameters"] == 
"y") {
 
 1091            $std_alias_item->deriveParameters();
 
 1094                $std_item->getLocation(),
 
 1095                $std_item->getFormat()
 
 1097                if (
$_POST[
"st_autostart"]) {
 
 1107        if ($this->content_obj->getMediaObject()->hasFullscreenItem()) {
 
 1108            if (
$_POST[
"fullscreen"] == 
"y") {
 
 1109                if (!$full_alias_item->exists()) {
 
 1110                    $full_alias_item->insert();
 
 1114                if (
$_POST[
"full_derive_size"] == 
"y") {
 
 1115                    $full_alias_item->deriveSize();
 
 1122                if (
$_POST[
"full_derive_caption"] == 
"y") {
 
 1123                    $full_alias_item->deriveCaption();
 
 1129                if (
$_POST[
"full_derive_text_representation"] == 
"y") {
 
 1130                    $full_alias_item->deriveTextRepresentation();
 
 1136                if (
$_POST[
"full_derive_parameters"] == 
"y") {
 
 1137                    $full_alias_item->deriveParameters();
 
 1140                        $full_item->getLocation(),
 
 1141                        $full_item->getFormat()
 
 1143                        if (
$_POST[
"full_autostart"]) {
 
 1153                if ($full_alias_item->exists()) {
 
 1154                    $full_alias_item->delete();
 
 1159        $this->updated = $this->pg_obj->update();
 
 1160        if ($this->updated === 
true) {
 
 1161            ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1162            $this->ctrl->redirect($this, 
"editAlias");
 
 1163            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1165            $this->pg_obj->addHierIDs();
 
 1177        $ilUser->addObjectToClipboard($this->content_obj->getMediaObject()->getId(), $this->content_obj->getMediaObject()->getType(), $this->content_obj->getMediaObject()->getTitle());
 
 1178        ilUtil::sendSuccess($this->lng->txt(
"copied_to_clipboard"), 
true);
 
 1179        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1191            $this->content_obj->getPcId()
 
 1193        $std_alias_item->setHorizontalAlign(
"Center");
 
 1194        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1195        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1207            $this->content_obj->getPcId()
 
 1209        $std_alias_item->setHorizontalAlign(
"Left");
 
 1210        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1211        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1223            $this->content_obj->getPcId()
 
 1225        $std_alias_item->setHorizontalAlign(
"Right");
 
 1226        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1227        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1239            $this->content_obj->getPcId()
 
 1241        $std_alias_item->setHorizontalAlign(
"LeftFloat");
 
 1242        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1243        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1255            $this->content_obj->getPcId()
 
 1257        $std_alias_item->setHorizontalAlign(
"RightFloat");
 
 1258        $_SESSION[
"il_pg_error"] = $this->pg_obj->update();
 
 1259        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1270        if (count($chars) > 1 ||
 
 1271            ($this->content_obj->getClass() != 
"" && $this->content_obj->getClass() != 
"Media")) {
 
 1289        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1291        $form->setFormAction(
$ilCtrl->getFormAction($this));
 
 1292        $form->setTitle($this->lng->txt(
"cont_edit_style"));
 
 1295        require_once(
"./Services/Form/classes/class.ilAdvSelectInputGUI.php");
 
 1297            $this->lng->txt(
"cont_characteristic"),
 
 1302        if (is_object($this->content_obj)) {
 
 1303            if ($chars[$a_seleted_value] == 
"" && ($this->content_obj->getClass() != 
"")) {
 
 1304                $chars = array_merge(
 
 1305                    array($this->content_obj->getClass() => $this->content_obj->getClass()),
 
 1311        $selected = $this->content_obj->getClass();
 
 1312        if ($selected == 
"") {
 
 1313            $selected = 
"MediaContainer";
 
 1316        foreach ($chars as $k => $char) {
 
 1317            $html = 
'<div class="ilCOPgEditStyleSelectionItem">' .
 
 1319            $char_prop->addOption($k, $char, $html);
 
 1322        $char_prop->setValue($selected);
 
 1323        $form->addItem($char_prop);
 
 1326        $form->addCommandButton(
"saveStyle", 
$lng->txt(
"save"));
 
 1328        $html = $form->getHTML();
 
 1329        $tpl->setContent($html);
 
 1338        $this->content_obj->setClass(
$_POST[
"characteristic"]);
 
 1339        $this->updated = $this->pg_obj->update();
 
 1340        if ($this->updated === 
true) {
 
 1341            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
 1343            $this->pg_obj->addHierIDs();
 
 1354    public function getTabs(&$tab_gui, $a_create = 
false, $a_change_obj_ref = 
false)
 
 1363                    $ilCtrl->getLinkTarget($this, 
"editStyle"),
 
 1370                "cont_mob_inst_prop",
 
 1371                $ilCtrl->getLinkTarget($this, 
"editAlias"),
 
 1377                $st_item = $this->content_obj->getMediaObject()->getMediaItem(
"Standard");
 
 1378                if (is_object($st_item)) {
 
 1379                    $format = $st_item->getFormat();
 
 1380                    if (substr(
$format, 0, 5) == 
"image" && !is_int(strpos(
$format, 
"svg"))) {
 
 1382                            "cont_inst_map_areas",
 
 1383                            $ilCtrl->getLinkTargetByClass(
"ilpcimagemapeditorgui", 
"editMapAreas"),
 
 1385                            "ilpcimagemapeditorgui" 
 1391            if ($a_change_obj_ref) {
 
 1392                $cmd = 
"changeObjectReference";
 
 1397            $ilCtrl->setParameter($this, 
"subCmd", 
"insertNew");
 
 1398            $ilTabs->addSubTabTarget(
 
 1400                $ilCtrl->getLinkTarget($this, $cmd),
 
 1404            $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
 1405            $ilTabs->addSubTabTarget(
 
 1406                "cont_mob_from_media_pool",
 
 1407                $ilCtrl->getLinkTarget($this, $cmd),
 
 1410            $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 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)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc