5require_once(
"./Services/COPage/classes/class.ilPCPlaceHolder.php");
 
    6require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
   37    public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = 
"")
 
   41        $this->lng = 
$DIC->language();
 
   42        $this->pg_obj = $a_pg_obj;
 
   43        $this->content_obj = $a_content_obj;
 
   44        $this->hier_id = $a_hier_id;
 
   45        $this->pc_id = $a_pc_id;
 
   47        parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 
   56        $next_class = $this->ctrl->getNextClass($this);
 
   58        $cmd = $this->ctrl->getCmd();
 
   60        switch ($next_class) {
 
   61            case 'ilpcmediaobjectgui':  
 
   62                include_once(
"./Services/COPage/classes/class.ilPCMediaObjectGUI.php");
 
   63                $media_gui = 
new ilPCMediaObjectGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
   64                $ret = $this->ctrl->forwardCommand($media_gui);
 
   80        $this->
propertyGUI(
"create", self::TYPE_TEXT, 
"100px", 
"insert");
 
   88        if (
$_POST[
"plach_height"]==
"" ||
 
   89            !preg_match(
"/[0-9]+/", 
$_POST[
"plach_height"])) {
 
   94        $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
 
   95        $this->content_obj->setHeight(
$_POST[
"plach_height"] . 
"px");
 
   96        $this->content_obj->setContentClass(
$_POST[
'plach_type']);
 
   97        $this->updated = $this->pg_obj->update();
 
   98        if ($this->updated === 
true) {
 
   99            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
  110        if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
 
  124        $this->styleid = $a_styleid;
 
  144            $this->content_obj->getContentClass(),
 
  145            $this->content_obj->getHeight(),
 
  152        switch ($this->content_obj->getContentClass()) {
 
  154                include_once(
"./Services/COPage/classes/class.ilPCMediaObjectGUI.php");
 
  155                $this->ctrl->setCmdClass(
"ilpcmediaobjectgui");
 
  156                $this->ctrl->setCmd(
"insert");
 
  158                $this->ctrl->forwardCommand($media_gui);
 
  166                include_once(
"./Services/COPage/classes/class.ilPCQuestionGUI.php");
 
  167                $this->ctrl->setCmdClass(
"ilpcquestiongui");
 
  168                $this->ctrl->setCmd(
"insert");
 
  169                $question_gui = 
new ilPCQuestionGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  170                $question_gui->setSelfAssessmentMode(
true);
 
  171                $this->ctrl->forwardCommand($question_gui);
 
  175                include_once(
"./Services/COPage/classes/class.ilPCVerificationGUI.php");
 
  176                $this->ctrl->setCmdClass(
"ilpcverificationgui");
 
  177                $this->ctrl->setCmd(
"insert");
 
  178                $cert_gui = 
new ilPCVerificationGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  179                $this->ctrl->forwardCommand($cert_gui);
 
  193        if (
$_POST[
"plach_height"]==
"" ||
 
  194            !preg_match(
"/[0-9]+/", 
$_POST[
"plach_height"])) {
 
  198        $this->content_obj->setContentClass(
$_POST[
'plach_type']);
 
  199        $this->content_obj->setHeight(
$_POST[
"plach_height"] . 
"px");
 
  201        $this->updated = $this->pg_obj->update();
 
  202        if ($this->updated === 
true) {
 
  203            $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
  205            $this->pg_obj->addHierIDs();
 
  217        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  219        $this->form_gui->setFormAction($this->ctrl->getFormAction($this));
 
  220        $this->form_gui->setTitle(
$lng->txt(
"cont_ed_plachprop"));
 
  227        $ttype_input->setRequired(
true);
 
  228        $this->form_gui->addItem($ttype_input);
 
  231        $theight_input->setSize(4);
 
  232        $theight_input->setMaxLength(3);
 
  233        $theight_input->setTitle(
$lng->txt(
"height") . 
" (px)");
 
  234        $theight_input->setRequired(
true);
 
  235        $this->form_gui->addItem($theight_input);
 
  237        $theight_input->setValue(preg_replace(
"/px/", 
"", $a_height));
 
  238        $ttype_input->setValue(
$a_type);
 
  240        $this->form_gui->addCommandButton($a_action, 
$lng->txt($a_mode));
 
  241        $this->form_gui->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  242        $this->tpl->setContent($this->form_gui->getHTML());
 
  252        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  254        $this->form_gui->setFormAction($this->ctrl->getFormAction($this));
 
  255        $this->form_gui->setTitle(
$lng->txt(
"cont_ed_select_pctext"));
 
  265        $this->form_gui->addItem($ttype_input);
 
  267        $this->form_gui->addCommandButton(
"insertPCText", 
$lng->txt(
"insert"));
 
  268        $this->form_gui->addCommandButton(
"cancelCreate", 
$lng->txt(
"cancel"));
 
  269        $this->tpl->setContent($this->form_gui->getHTML());
 
  277        switch (
$_POST[
'pctext_type']) {
 
  283                    $ret_class = $this->ctrl->getReturnClass($this);
 
  284                    $this->ctrl->setParameterByClass($ret_class, 
"pl_hier_id", $this->hier_id);
 
  285                    $this->ctrl->setParameterByClass($ret_class, 
"pl_pc_id", $this->pc_id);
 
  286                    $this->ctrl->redirectByClass(
 
  288                        "insertJSAtPlaceholder" 
  292                include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
 
  293                $this->ctrl->setCmdClass(
"ilpcparagraphgui");
 
  294                $this->ctrl->setCmd(
"insert");
 
  295                $paragraph_gui = 
new ilPCParagraphGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  296                $paragraph_gui->setStyleId($this->
getStyleId());
 
  298                $this->ctrl->forwardCommand($paragraph_gui);
 
  302                include_once(
"./Services/COPage/classes/class.ilPCDataTableGUI.php");
 
  303                $this->ctrl->setCmdClass(
"ilpcdatatablegui");
 
  304                $this->ctrl->setCmd(
"insert");
 
  305                $dtable_gui = 
new ilPCDataTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  306                $this->ctrl->forwardCommand($dtable_gui);
 
  310                include_once(
"./Services/COPage/classes/class.ilPCTableGUI.php");
 
  311                $this->ctrl->setCmdClass(
"ilpctablegui");
 
  312                $this->ctrl->setCmd(
"insert");
 
  313                $atable_gui = 
new ilPCTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  314                $this->ctrl->forwardCommand($atable_gui);
 
  318                include_once(
"./Services/COPage/classes/class.ilPCListGUI.php");
 
  319                $this->ctrl->setCmdClass(
"ilpclistgui");
 
  320                $this->ctrl->setCmd(
"insert");
 
  321                $list_gui = 
new ilPCListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  322                $this->ctrl->forwardCommand($list_gui);
 
  326                include_once(
"./Services/COPage/classes/class.ilPCFileListGUI.php");
 
  327                $this->ctrl->setCmdClass(
"ilpcfilelistgui");
 
  328                $this->ctrl->setCmd(
"insert");
 
  329                $file_list_gui = 
new ilPCFileListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  330                $file_list_gui->setStyleId($this->
getStyleId());
 
  331                $this->ctrl->forwardCommand($file_list_gui);
 
  335                include_once(
"./Services/COPage/classes/class.ilPCTabsGUI.php");
 
  336                $this->ctrl->setCmdClass(
"ilpctabsgui");
 
  337                $this->ctrl->setCmd(
"insert");
 
  338                $tabs_gui = 
new ilPCTabsGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
 
  340                $this->ctrl->forwardCommand($tabs_gui);
 
  353        $this->ctrl->returnToParent($this, 
"jump" . $this->hier_id);
 
  359        if (method_exists($this->
getPageConfig(), 
"getAvailablePlaceholderTypes")) {
 
  360            $types = $this->
getPageConfig()->getAvailablePlaceholderTypes();
 
  362            $types = array(self::TYPE_TEXT, self::TYPE_MEDIA, self::TYPE_QUESTION);
 
  365        include_once(
"./Services/Certificate/classes/class.ilCertificate.php");
 
  369            if ((
$key = array_search(self::TYPE_VERIFICATION, $types)) !== 
false &&
 
  370                self::TYPE_VERIFICATION != $a_selected_type) {
 
  382                self::TYPE_TEXT => 
$lng->txt(
"cont_ed_plachtext"),
 
  383                self::TYPE_MEDIA => 
$lng->txt(
"cont_ed_plachmedia"),
 
  384                self::TYPE_QUESTION => 
$lng->txt(
"cont_ed_plachquestion"),
 
  385                self::TYPE_VERIFICATION => 
$lng->txt(
"cont_ed_plachverification")
 
An exception for terminatinating execution or to throw for unit testing.
Class ilPCPlaceHolderGUI.
insertPCText()
Forwards Text Item Selection to GUI classes.
getAvailableTypes($a_selected_type="")
getStyleId()
Get Style Id.
setStyleId($a_styleid)
Set Style Id.
saveProperties()
save placeholder properties in db and return to page edit screen
textCOSelectionGUI()
Text Item Selection.
edit_object()
Handle Editing Private Methods.
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor @access public.
create()
create new table in dom and update page in db
propertyGUI($a_action, $a_type, $a_height, $a_mode)
Object Property GUI.
executeCommand()
execute command
Class ilPCVerificationGUI.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
getPageConfig()
Get Page Config.
static _doJSEditing()
checks if current user has activated js editing and if browser is js capable
This class represents an option in a radio group.
This class represents a text property in a property form.