/**
  * function deleteEntry
  * <pre>
  * Removes the child entries of Module objects before removing self. 
  * (Poor Man's Referential Integrity)
  * </pre>
  * @return [void]
  */
 function deleteEntry()
 {
     // first remove any associated State Variables
     $list = new StateVarList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Data Access Objects
     $list = new DAObjList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Page Objects
     $list = new PageList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Transitions
     $list = new TransitionsList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now call parent method
     parent::deleteEntry();
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     $path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     $this->template = new Template($path);
     // store the form action data
     $this->template->set('formAction', $this->formCallBack);
     // store the page labels used by this template...
     // NOTE: use this location to update any label tags ...
     $name = $this->itemManager->getName();
     $this->labels->setLabelTag('[Title]', '[daobjName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store the field names being displayed
     $fieldNames = explode(',', page_DeleteDAObj::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     // store XML Data of item
     $this->template->setXML('dataItem', $this->itemManager->getXML());
     // add the drop list info for the state var choices
     $moduleID = $this->itemManager->getModuleID();
     $stateVarList = new StateVarList($moduleID);
     $stateVarArray = $stateVarList->getDropListArray();
     $this->template->set('list_daobj_managerInitVarID', $stateVarArray);
     $this->template->set('list_daobj_listInitVarID', $stateVarArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_DeleteDAObj.php';
     // otherwise use the generic admin box template
     $templateName = 'siteDeleteConf.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     $this->template = new Template($path);
     // store any additional values to template
     $this->template->set('formAction', $this->formAction);
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     $moduleManager = new RowManager_ModuleManager($this->module_id);
     $name = $moduleManager->getModuleName();
     $this->labels->setLabelTag('[Title]', '[moduleName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     // save the list of form fields
     $this->template->set('formFieldList', $this->formFields);
     // store the field types being displayed
     $fieldTypes = explode(',', FormProcessor_AddDAObj::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     // store the button label
     $this->template->set('buttonText', $this->labels->getLabel('[Add]'));
     // Insert the date start/end values for the following date fields:
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * Add any additional data required by the template here
      */
     // add the drop list info for the state var choices
     $stateVarList = new StateVarList($this->module_id);
     $stateVarArray = $stateVarList->getDropListArray();
     $this->template->set('list_daobj_managerInitVarID', $stateVarArray);
     $this->template->set('list_daobj_listInitVarID', $stateVarArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_AddDAObj.php';
     // otherwise use the generic admin box template
     $templateName = 'siteFormSingle.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getCallBackParamList
  * <pre>
  * Creates a set of call back parameters given the current module id.
  * </pre>
  * @param $moduleID [INTEGER] module id of the state vars to use.
  * @param $skipField [STRING] name of the field to skip in the param list
  * @return [STRING]
  */
 function getCallBackParamList($moduleID, $skipField = '')
 {
     // get list of this module's state vars
     $stateVarList = new StateVarList($moduleID);
     // for each statevar object
     $callbackParamList = '';
     $stateVarList->setFirst();
     while ($stateVar = $stateVarList->getNext()) {
         $stateVarName = $stateVar->getName();
         if ($stateVarName != $skipField) {
             if ($callbackParamList != '') {
                 $callbackParamList .= ', ';
             }
             $callbackParamList .= '\'' . $stateVarName . '\'=>$this->' . $stateVarName;
         } else {
             //                $callbackParamList .= ', ""';
         }
     }
     return $callbackParamList;
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     $path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     $this->template = new Template($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', RowManager_DAObjManager::XML_NODE_NAME);
     // store the field names being displayed
     $fieldNames = explode(',', page_DAObjList::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'daobj_id');
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     $this->template->set('linkValues', $this->linkValues);
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     $this->template->set('linkLabels', $this->linkLabels);
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     $this->template->set('linkColumns', $this->linkColumns);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     $moduleManager = new RowManager_ModuleManager($this->module_id);
     $name = $moduleManager->getModuleName();
     $this->labels->setLabelTag('[Title]', '[moduleName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store XML List of Applicants ...
     $this->template->setXML('dataList', $this->listManager->getXML());
     /*
      *  Set up any additional data transfer to the Template here...
      */
     $moduleID = $moduleManager->getID();
     $stateVarList = new StateVarList($moduleID);
     $dataList = $stateVarList->getDroplistArray();
     $this->template->set('list_daobj_managerInitVarID', $dataList);
     $this->template->set('list_daobj_listInitVarID', $dataList);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_DAObjList.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     $this->template = new Template($path);
     // store the form action information
     $this->template->set('formAction', $this->formAction);
     // store the link values
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     $this->template->set('linkValues', $this->linkValues);
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     $this->template->set('linkLabels', $this->linkLabels);
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     $this->template->set('linkColumns', $this->linkColumns);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->dafield_id);
     // store the current op type
     $this->template->set('opType', $this->opType);
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     // example:
     $daObj = new RowManager_DAObjManager($this->daobj_id);
     $name = $daObj->getName();
     $this->labels->setLabelTag('[Title]', '[daobjName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     // save the list of form fields
     $this->template->set('formFieldList', $this->formFields);
     // store the field types being displayed
     $fieldTypes = explode(',', FormProcessor_AddDAFields::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     // Insert the date start/end values for the following date fields:
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = RowManager_DAFieldManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'dafield_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     $this->dataList = new DAFieldList($this->daobj_id, $this->sortBy);
     $this->template->setXML('dataList', $this->dataList->getXML());
     // store the field names being displayed
     $fieldNames = explode(',', FormProcessor_AddDAFields::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     /*
      * Add any additional data required by the template here
      */
     // add Variable Type List
     $listData['STRING'] = $this->labels->getLabel('[STRING]');
     $listData['BOOL'] = $this->labels->getLabel('[BOOL]');
     $listData['INTEGER'] = $this->labels->getLabel('[INTEGER]');
     $listData['DATE'] = $this->labels->getLabel('[DATE]');
     $this->template->set('list_dafield_type', $listData);
     // add StateVar List
     // get module ID
     $moduleID = $daObj->getModuleID();
     $stateVarList = new StateVarList($moduleID);
     $dataList = $stateVarList->getDroplistArray();
     $this->template->set('list_statevar_id', $dataList);
     // add DB Field Type List
     $this->template->set('list_dbType', $this->dataManager->getDBFieldTypeArray());
     $this->template->set('list_dafield_dbType', $this->dataManager->getDBFieldTypeArray());
     // add Form Field Types List
     $fileName = 'objects/TemplateTools.php';
     $path = Page::findPathExtension($fileName);
     require_once $path . $fileName;
     $templateTools = new TemplateTools();
     $formTypes = $templateTools->getFormTypeList();
     $this->template->set('list_dafield_formFieldType', $formTypes);
     //$templateName = 'page_AddDAFields.php';
     $templateName = 'siteFormDataList.php';
     return $this->template->fetch($templateName);
 }