/**
  * editformAction
  * @author Cornelius Hansjakob <*****@*****.**>
  * @version 1.0
  */
 public function editformAction()
 {
     $this->core->logger->debug('contacts->controllers->MemberController->editformAction()');
     $this->getForm($this->core->sysConfig->generic->actions->edit);
     /**
      * load generic data
      */
     $this->objForm->loadFormData();
     /**
      * set action
      */
     $this->objForm->setAction('/zoolu/contacts/member/edit');
     /**
      * prepare form (add fields and region to the Zend_Form)
      */
     $this->objForm->prepareForm();
     /**
      * get form title
      */
     $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
     /**
      * output of metainformation to hidden div
      */
     //$this->setViewMetaInfos();
     $this->view->form = $this->objForm;
     $this->renderScript('form.phtml');
 }
 /**
  * geteditformAction
  * @author Cornelius Hansjakob <*****@*****.**>
  * @version 1.0
  */
 public function geteditformAction()
 {
     $this->core->logger->debug('core->controllers->FolderController->geteditformAction()');
     try {
         $this->getForm($this->core->sysConfig->generic->actions->edit);
         /**
          * load generic data
          */
         $this->objForm->loadFormData();
         $this->addFolderSpecificFormElements();
         /**
          * set action
          */
         $this->objForm->setAction('/zoolu/core/folder/edit');
         /**
          * prepare form (add fields and region to the Zend_Form)
          */
         $this->objForm->prepareForm();
         /**
          * get form title
          */
         $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
         /**
          * output of metainformation to hidden div
          */
         $this->setViewMetaInfos();
         $this->view->form = $this->objForm;
         $this->renderScript('folder/form.phtml');
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }
 /**
  * geteditformAction
  * @author Daniel Rotter <*****@*****.**>
  * @version 1.0
  */
 public function geteditformAction()
 {
     $this->core->logger->debug('cms->controllers->WidgetController->geteditformAction()');
     try {
         $this->getForm($this->core->sysConfig->generic->actions->edit);
         $this->objForm->loadFormData();
         $this->addWidgetSpecificFormElements();
         $this->objForm->setAction('/zoolu/cms/widget/edit');
         $this->objForm->prepareForm();
         $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
         $this->setViewMetaInfos();
         $this->view->form = $this->objForm;
         $this->renderScript('page/form.phtml');
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
     }
 }
 /**
  * getsubwidgeteditformAction
  * @author Daniel Rotter <*****@*****.**>
  * @version 1.0
  */
 public function geteditsubwidgetformAction()
 {
     $this->core->logger->debug('widgets->blog->FormController->getsubwidgeteditformAction()');
     try {
         $this->getFormArticle($this->core->sysConfig->generic->actions->edit);
         $arrData = $this->getModelBlogEntry()->getBlogEntry($this->objRequest->getParam('subWidgetId'));
         $arrData = array_merge($this->objRequest->getPost(), $arrData);
         $this->objForm->Setup()->setFieldValues($arrData);
         $this->objForm->Setup()->setSubwidgetId($arrData['subwidgetId']);
         $this->objForm->loadFormData();
         $this->getBlogSpecificElements();
         $this->objForm->setAction('/../widget/blog/form/editsubwidget');
         $this->objForm->prepareForm();
         $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
         $this->setViewMetaInfos();
         $this->view->form = $this->objForm;
         $this->renderScript('blog/form.phtml');
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }
 /**
  * geteditformAction
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function geteditformAction()
 {
     $this->core->logger->debug('properties->controllers->LocationController->geteditformAction()');
     $this->getForm($this->core->sysConfig->generic->actions->edit);
     /**
      * load generic data
      */
     $this->objForm->loadFormData();
     /**
      * set action
      */
     $this->objForm->setAction('/zoolu/properties/location/edit');
     /**
      * prepare form (add fields and region to the Zend_Form)
      */
     $this->objForm->prepareForm();
     /**
      * get form title
      */
     $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
     $this->view->form = $this->objForm;
     $this->renderScript('location/form.phtml');
 }
 /**
  * geteditformAction
  * @author Cornelius Hansjakob <*****@*****.**>
  * @version 1.0
  */
 public function geteditformAction()
 {
     $this->core->logger->debug('properties->controllers->CategoryController->geteditformAction()');
     $this->getForm($this->core->sysConfig->generic->actions->edit);
     /**
      * load generic data
      */
     $this->objForm->loadFormData();
     /**
      * set action
      */
     $this->objForm->setAction('/zoolu/properties/category/edit');
     /**
      * prepare form (add fields and region to the Zend_Form)
      */
     $this->objForm->prepareForm();
     /**
      * get form title
      */
     $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
     $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId());
     $this->view->form = $this->objForm;
     $this->renderScript('category/form.phtml');
 }
/**
 * buildProdcutLanguageVariant
 */
function buildProdcutLanguageVariant($objProduct)
{
    global $objConsoleOpts, $core;
    // product form
    $objProductForm = new GenericForm();
    $objProductForm->Setup()->setElementId($objProduct->id);
    $objProductForm->Setup()->setElementLinkId($objProduct->linkGlobalId);
    $objProductForm->Setup()->setFormId($objProduct->genericFormId);
    $objProductForm->Setup()->setTemplateId($objProduct->templateId);
    $objProductForm->Setup()->setFormVersion($objProduct->version);
    $objProductForm->Setup()->setActionType($core->sysConfig->generic->actions->edit);
    $objProductForm->Setup()->setLanguageId($objConsoleOpts->fromLanguageId);
    $objProductForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id);
    $objProductForm->Setup()->setModelSubPath('global/models/');
    // load basic generic form
    $objProductForm->Setup()->loadGenericForm();
    // load generic form structur
    $objProductForm->Setup()->loadGenericFormStructure();
    // init data type object
    $objProductForm->initDataTypeObject();
    // load data
    $objProductForm->loadFormData();
    // set fallback language
    $objProductForm->Setup()->setLanguageFallbackId($objConsoleOpts->toLanguageId);
    // reset fields
    foreach ($objProductForm->Setup()->FieldNames() as $strField => $intType) {
        if ($strField != 'title' && $strField != 'internal_links_title' && $strField != 'internal_links' && $strField != 'category' && $strField != 'label') {
            $objProductForm->Setup()->getField($strField)->setValue(null);
        }
    }
    // reset multi regions
    foreach ($objProductForm->Setup()->MultiplyRegionIds() as $intRegionId) {
        $objProductForm->Setup()->getRegion($intRegionId)->resetRegionInstances();
    }
    // set new language
    $objProductForm->saveFormData();
}
/**
 * buildProdcutLanguageVariant
 */
function buildProdcutLanguageVariant($objProduct)
{
    global $objConsoleOpts, $core;
    // product form
    $objProductForm = new GenericForm();
    $objProductForm->Setup()->setElementId($objProduct->id);
    $objProductForm->Setup()->setElementLinkId($objProduct->linkGlobalId);
    $objProductForm->Setup()->setFormId($objProduct->genericFormId);
    $objProductForm->Setup()->setTemplateId($objProduct->templateId);
    $objProductForm->Setup()->setFormVersion($objProduct->version);
    $objProductForm->Setup()->setActionType($core->sysConfig->generic->actions->edit);
    $objProductForm->Setup()->setLanguageId($objConsoleOpts->fromLanguageId);
    $objProductForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id);
    $objProductForm->Setup()->setModelSubPath('global/models/');
    // load basic generic form
    $objProductForm->Setup()->loadGenericForm();
    // load generic form structur
    $objProductForm->Setup()->loadGenericFormStructure();
    // init data type object
    $objProductForm->initDataTypeObject();
    // load data
    $objProductForm->loadFormData();
    // set new language
    $objProductForm->Setup()->setLanguageId($objConsoleOpts->toLanguageId);
    //rest url
    if ($objProductForm->Setup()->getField('url')) {
        $objProductForm->Setup()->getField('url')->setValue('');
    }
    // set new language
    $objProductForm->saveFormData();
}
 /**
  * changetypeAction
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function changetypeAction()
 {
     $this->core->logger->debug('global->controllers->ElementController->changetypeAction()');
     try {
         $strGroupKey = $this->objRequest->getParam('rootLevelGroupKey');
         $strGroupKeyLink = $strGroupKey . '_link';
         $strGroupKeyOverview = $strGroupKey . '_overview';
         if ($this->objRequest->getParam('elementTypeId') != '' && $this->objRequest->getParam('elementTypeId') > 0) {
             switch ($this->objRequest->getParam('elementTypeId')) {
                 case $this->core->sysConfig->global_types->{$strGroupKey}->id:
                     $this->objRequest->setParam('formId', '');
                     if ($this->objRequest->getParam('isStartGlobal') == 'true' && $this->objRequest->getParam('parentTypeId') == $this->core->sysConfig->parent_types->rootlevel) {
                         $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId);
                     } else {
                         if ($this->objRequest->getParam('isStartGlobal') == 'true') {
                             $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId);
                         } else {
                             $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId);
                         }
                     }
                     break;
                 case $this->core->sysConfig->global_types->{$strGroupKeyOverview}->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKeyOverview}->default_templateId);
                     break;
                 case $this->core->sysConfig->global_types->{$strGroupKeyLink}->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->global_types->{$strGroupKeyLink}->default_formId);
                     break;
             }
         }
         $this->getForm($this->core->sysConfig->generic->actions->edit);
         /**
          * load generic data
          */
         $this->objForm->loadFormData();
         /**
          * overwrite now the global type
          */
         $this->objForm->Setup()->setElementTypeId($this->objRequest->getParam('elementTypeId'));
         $this->addGlobalSpecificFormElements();
         /**
          * set action
          */
         if (intval($this->objRequest->getParam('id')) > 0) {
             $this->objForm->setAction('/zoolu/global/element/edit');
         } else {
             $this->objForm->setAction('/zoolu/global/element/add');
         }
         /**
          * prepare form (add fields and region to the Zend_Form)
          */
         $this->objForm->prepareForm();
         /**
          * get form title
          */
         $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
         /**
          * output of metainformation to hidden div
          */
         $this->setViewMetaInfos();
         $this->view->form = $this->objForm;
         $this->renderScript('element/form.phtml');
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }
/**
 * buildProdcutLanguageVariant
 */
function buildProdcutUrl($objProduct)
{
    global $objConsoleOpts, $core;
    // product form
    $objProductForm = new GenericForm();
    $objProductForm->Setup()->setElementId($objProduct->id);
    $objProductForm->Setup()->setElementLinkId($objProduct->linkGlobalId);
    $objProductForm->Setup()->setFormId($objProduct->genericFormId);
    $objProductForm->Setup()->setTemplateId($objProduct->templateId);
    $objProductForm->Setup()->setFormVersion($objProduct->version);
    $objProductForm->Setup()->setActionType($core->sysConfig->generic->actions->edit);
    $objProductForm->Setup()->setLanguageId($objConsoleOpts->languageId);
    $objProductForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id);
    $objProductForm->Setup()->setModelSubPath('global/models/');
    // load basic generic form
    $objProductForm->Setup()->loadGenericForm();
    // load generic form structur
    $objProductForm->Setup()->loadGenericFormStructure();
    // init data type object
    $objProductForm->initDataTypeObject();
    // load data
    $objProductForm->loadFormData();
    // product url form
    $objProductUrlForm = new GenericForm();
    $objProductUrlForm->Setup()->setElementId($objProduct->id);
    $objProductUrlForm->Setup()->setElementLinkId($objProduct->linkGlobalId);
    $objProductUrlForm->Setup()->setFormId($objProduct->genericFormId);
    $objProductUrlForm->Setup()->setTemplateId($objProduct->templateId);
    $objProductUrlForm->Setup()->setFormVersion($objProduct->version);
    $objProductUrlForm->Setup()->setActionType($core->sysConfig->generic->actions->edit);
    $objProductUrlForm->Setup()->setLanguageId($objConsoleOpts->urlLanguageId);
    $objProductUrlForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id);
    $objProductUrlForm->Setup()->setModelSubPath('global/models/');
    // load basic generic form
    $objProductUrlForm->Setup()->loadGenericForm();
    // load generic form structur
    $objProductUrlForm->Setup()->loadGenericFormStructure();
    // init data type object
    $objProductUrlForm->initDataTypeObject();
    // load data
    $objProductUrlForm->loadFormData();
    //rest url
    if ($objProductForm->Setup()->getField('url') && $objProductUrlForm->Setup()->getField('title') && $objProductUrlForm->Setup()->getField('title')->getValue() != '') {
        $_POST['url_EditableUrl'] = trim($objProductUrlForm->Setup()->getField('title')->getValue(), ' _-+!?');
        $objProductForm->Setup()->getField('url')->save($objProduct->linkGlobalId, 'global');
        $objProductForm->Setup()->getField('url')->removeUrlHistory($objProduct->linkGlobalId, 'global');
    }
}
 /**
  * changetypeAction
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function changetypeAction()
 {
     $this->core->logger->debug('cms->controllers->PageController->changetypeAction()');
     try {
         if ($this->objRequest->getParam('pageTypeId') != '' && $this->objRequest->getParam('pageTypeId') > 0) {
             switch ($this->objRequest->getParam('pageTypeId')) {
                 case $this->core->sysConfig->page_types->page->id:
                     $this->objRequest->setParam('formId', '');
                     if ($this->objRequest->getParam('isStartPage') == 'true' && $this->objRequest->getParam('parentTypeId') == $this->core->sysConfig->parent_types->rootlevel) {
                         $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->portal_startpage_templateId);
                     } else {
                         if ($this->objRequest->getParam('isStartPage') == 'true') {
                             $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->startpage_templateId);
                         } else {
                             $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->default_templateId);
                         }
                     }
                     break;
                 case $this->core->sysConfig->page_types->link->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->link->default_formId);
                     break;
                 case $this->core->sysConfig->page_types->overview->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->overview->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->external->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->external->default_formId);
                     break;
                 case $this->core->sysConfig->page_types->process->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->process->default_formId);
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->process->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->collection->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->collection->default_formId);
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->collection->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->product_tree->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->product_tree->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->press_area->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->press_area->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->courses->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->courses->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->events->id:
                     $this->objRequest->setParam('formId', '');
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->events->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->iframe->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->iframe->default_formId);
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->iframe->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->download_center->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->download_center->default_formId);
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->download_center->default_templateId);
                     break;
                 case $this->core->sysConfig->page_types->sitemap->id:
                     $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->sitemap->default_formId);
                     $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->sitemap->default_templateId);
                     break;
             }
         }
         $this->getForm($this->core->sysConfig->generic->actions->edit);
         /**
          * load generic data
          */
         $this->objForm->loadFormData();
         /**
          * overwrite now the page type
          */
         $this->objForm->Setup()->setElementTypeId($this->objRequest->getParam('pageTypeId'));
         $this->addPageSpecificFormElements();
         /**
          * set action
          */
         if (intval($this->objRequest->getParam('id')) > 0) {
             $this->objForm->setAction('/zoolu/cms/page/edit');
         } else {
             $this->objForm->setAction('/zoolu/cms/page/add');
         }
         /**
          * prepare form (add fields and region to the Zend_Form)
          */
         $this->objForm->prepareForm();
         /**
          * get form title
          */
         $this->view->formtitle = $this->objForm->Setup()->getFormTitle();
         /**
          * output of metainformation to hidden div
          */
         $this->setViewMetaInfos();
         $this->view->form = $this->objForm;
         $this->renderScript('page/form.phtml');
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }