コード例 #1
0
 /**
  * function deleteEntry
  * <pre>
  * Removes the child entries of page objects before removing self.
  * </pre>
  * @return [void]
  */
 function deleteEntry()
 {
     // first remove any associated fields with this Page
     $pageFieldList = new PageFieldList($this->getID());
     $pageFieldList->setFirst();
     while ($field = $pageFieldList->getNext()) {
         $field->deleteEntry();
     }
     // now remove any labels associated with this Page
     $pageLabelList = new PageLabelsList($this->getID());
     $pageLabelList->setFirst();
     while ($label = $pageLabelList->getNext()) {
         $label->deleteEntry();
     }
     // now call parent method
     parent::deleteEntry();
 }
コード例 #2
0
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     $this->template = new Template($this->pathModuleRoot . 'templates/');
     // store any additional values to template
     $this->template->set('formAction', $this->formAction);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     $name = $this->dataManager->getName();
     $this->labels->setLabelTag('[Title]', '[pageName]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     // store all the fields to the template
     //        $this->setFormFieldsToTemplate();
     /*
      * Add any additional data required by the template here
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = RowManager_DAFieldManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     /*
      * get list of Form DAObj Fields
      */
     // get Form DAObj from PageManager
     $formDAObj = $this->dataManager->getFormDAObj();
     // get List of Fields from Form DAObj Manager
     $fieldList = $formDAObj->getFieldList();
     // set List of Form Fields
     $this->template->setXML('formFields', $fieldList->getXML());
     // get list of current page Fields for Form DAObj Mgr from PageManager
     $pageID = $this->dataManager->getID();
     $formDAObjID = $formDAObj->getID();
     $currentFormFieldList = new PageFieldList($pageID, $formDAObjID, 1);
     // set list of current Form Fields
     $this->template->setXML('currentFormFields', $currentFormFieldList->getXML());
     // set ID of Form DAObj
     $this->template->set('formDAObjID', $formDAObjID);
     /*
      * get list of List DAObj Fields
      */
     // get List DAObj form PageManager
     $listDAObj = $this->dataManager->getListDAObj();
     // get List of Fields from List DAObj Manager
     $fieldList = $listDAObj->getFieldList();
     // set List of List Fields
     $this->template->setXML('listFields', $fieldList->getXML());
     // get list of current page fields for List DAObj Mgn from PageManager
     $pageID = $this->dataManager->getID();
     $listDAObjID = $listDAObj->getID();
     $currentListFieldList = new PageFieldList($pageID, $listDAObjID, 0);
     // set list of current List Fields
     $this->template->setXML('currentListFields', $currentListFieldList->getXML());
     // set ID of List DAObj
     $this->template->set('listDAObjID', $listDAObjID);
     return $this->template->fetch('page_ViewPageFields.php');
 }