/**
  * Generates a simple form to edit and create elements' basic data.
  *
  * @param class_module_pages_element $objElement
  *
  * @return class_admin_formgenerator
  */
 private function getElementForm(class_module_pages_element $objElement)
 {
     //Fetch Admin classes
     $arrClasses = class_resourceloader::getInstance()->getFolderContent("/admin/elements", array(".php"));
     $arrClassesAdmin = array();
     foreach ($arrClasses as $strClass) {
         $arrClassesAdmin[$strClass] = $strClass;
     }
     //Fetch Portal-Classes
     $arrClassesPortal = array();
     $arrClasses = class_resourceloader::getInstance()->getFolderContent("/portal/elements", array(".php"));
     foreach ($arrClasses as $strClass) {
         $arrClassesPortal[$strClass] = $strClass;
     }
     $objForm = new class_admin_formgenerator("element", $objElement);
     //redefine for proper lang-rendering
     $objElement->setArrModuleEntry("modul", "pages");
     $objForm->generateFieldsFromObject();
     $objForm->getField("cachetime")->setStrHint($this->getLang("element_cachetime_hint"));
     $objForm->getField("classadmin")->setArrKeyValues($arrClassesAdmin);
     $objForm->getField("classportal")->setArrKeyValues($arrClassesPortal);
     //check if the config-vals may be overriden
     /** @var $objAdminInstance class_element_admin */
     if ($objElement->getSystemid() != "") {
         $objAdminInstance = $objElement->getAdminElementInstance();
         if ($objAdminInstance->getConfigVal1Name() != "") {
             $objForm->addDynamicField("strConfigval1")->setStrLabel($objAdminInstance->getConfigVal1Name());
         }
         if ($objAdminInstance->getConfigVal2Name() != "") {
             $objForm->addDynamicField("strConfigval2")->setStrLabel($objAdminInstance->getConfigVal2Name());
         }
         if ($objAdminInstance->getConfigVal3Name() != "") {
             $objForm->addDynamicField("strConfigval3")->setStrLabel($objAdminInstance->getConfigVal3Name());
         }
     }
     return $objForm;
 }