/**
  * Get layout option
  *
  * @return object layout form option
  */
 static function getLayoutOption($a_txt, $a_var, $a_def_option = "")
 {
     global $lng;
     // default layout
     $layout = new ilRadioGroupInputGUI($a_txt, $a_var);
     if ($a_def_option != "") {
         if (is_file($im = ilUtil::getImagePath("layout_" . $a_def_option . ".png"))) {
             $im_tag = ilUtil::img($im, $a_def_option);
         }
         $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" . $lng->txt("cont_lm_default_layout") . "</b>: " . $lng->txt("cont_layout_" . $a_def_option) . "</td></tr></table>", ""));
     }
     foreach (ilObjContentObject::getAvailableLayouts() as $l) {
         $im_tag = "";
         if (is_file($im = ilUtil::getImagePath("layout_" . $l . ".png"))) {
             $im_tag = ilUtil::img($im, $l);
         }
         $layout->addOption(new ilRadioOption("<table><tr><td style='padding: 0px 5px 5px;'>" . $im_tag . "</td><td style='padding:5px;'><b>" . $lng->txt("cont_layout_" . $l) . "</b>: " . $lng->txt("cont_layout_" . $l . "_desc") . "</td></tr></table>", $l));
     }
     return $layout;
 }
 /**
  * Init edit layout form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initEditLayoutForm()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // default layout
     $layout = new ilRadioGroupInputGUI($lng->txt("cont_layout"), "layout");
     if (is_file($im = ilUtil::getImagePath("layout_" . $this->content_object->getLayout() . ".png"))) {
         $im_tag = ilUtil::img($im, $this->content_object->getLayout());
     }
     $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" . $lng->txt("cont_lm_default_layout") . "</b>: " . $lng->txt("cont_layout_" . $this->content_object->getLayout()) . "</td></tr></table>", ""));
     foreach (ilObjContentObject::getAvailableLayouts() as $l) {
         $im_tag = "";
         if (is_file($im = ilUtil::getImagePath("layout_" . $l . ".png"))) {
             $im_tag = ilUtil::img($im, $l);
         }
         $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" . $lng->txt("cont_layout_" . $l) . "</b>: " . $lng->txt("cont_layout_" . $l . "_desc") . "</td></tr></table>", $l));
     }
     $layout->setValue($this->obj->getLayout());
     $this->form->addItem($layout);
     $this->form->addCommandButton("saveLayout", $lng->txt("save"));
     $this->form->setTitle($lng->txt("cont_page_layout"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }