/**
  * function __construct
  * <pre>
  * Initialize this object.
  * </pre>
  * @param $language_id [INTEGER] The unique id of the dataManager.
  * @param $languageID [INTEGER] The desired language id of the viewer
  * @param $manager [OBJECT] A Multilingual Manager object for retrieving the label manager object.  (Highly suggest passing one in for creating multiple objects ... like the list object)
  * @return [void]
  */
 function __construct($language_id = -1, $languageID = '', $manager = null)
 {
     $dataManager = new RowManager_LanguageManager($language_id);
     /*        
     echo 'language_id=['.$language_id.']<br>';
     if ($dataManager->isLoaded()){
     echo 'dataManager is Loaded<br>';
     } else {
     echo 'dataManager is NOT loaded <br>';
     }
     */
     // if a manager object was not provided then create it
     if (is_null($manager)) {
         $seriesKey = SITE_LABEL_SERIES_SITE;
         $pageKey = RowManager_LanguageManager::MULTILINGUAL_PAGE_KEY;
         $manager = new MultilingualManager($languageID, $seriesKey, $pageKey);
     }
     $xmlNodeName = RowLabelBridge_LanguageLabelManager::XML_NODE_NAME;
     parent::__construct($dataManager, $manager, $xmlNodeName);
 }
 /**
  * function loadFromArray
  * <pre>
  * Loads the objects from a given array of data.
  * </pre>
  * @param $values [ARRAY] array of data: array( $field=>$value,...,$field=>$value);
  * @return [void]
  */
 function loadFromArray($values)
 {
     // initialize all managed rowMangers with these values
     parent::loadFromArray($values);
     // now if there is a hidden viewerLangaugeIDKey in the values
     $key = $this->getViewerLanguageIDKey();
     if (isset($values[$key])) {
         // update labelManager with this value
         $this->labelManager->setLanguageID($values[$key]);
         $this->viewerLangaugeID = $values[$key];
     }
 }
 /**
  * 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('[view]');
     $link = $this->linkValues['groups'];
     $fieldName = 'accesscategory_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     $this->template->set('linkColumns', $this->linkColumns);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->accesscategory_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:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $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_AccessCategories::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = $this->dataManager->getXMLNodeName();
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'accesscategory_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 AccessCategoryList( $this->sortBy );
     $categoryManager = new RowManager_AccessCategoryManager();
     $bridgeManager = new RowLabelBridge($categoryManager, $this->bridgeMultiLingualManager);
     $this->dataList = $bridgeManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     // store the field names being displayed
     $fieldNames = explode(',', FormProcessor_AccessCategories::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     /*
      * Add any additional data required by the template here
      */
     $templateName = 'siteAdminBox.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_AccessCategories.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;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // 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';
     /*
      * store any additional link Columns
      */
     // example:
     $title = $this->labels->getLabel('[title_links]');
     $columnLabel = $this->labels->getLabel('[view]');
     $link = $this->linkValues['viewLink'];
     $fieldName = 'navbargroup_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->navbargroup_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * 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 = $this->dataManager->getXMLNodeName();
     //RowManager_NavBarGroupManager::XML_NODE_NAME;
     //echo 'xmlNodeName = ['.$xmlNodeName.']<br>';
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'navbargroup_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 NavBarGroupList( $this->sortBy );
     $groupManager = new RowManager_NavBarGroupManager();
     $bridgeManager = new RowLabelBridge($groupManager, $this->bridgeMultiLingualManager);
     $bridgeManager->setSortOrder($this->sortBy);
     $this->dataList = $bridgeManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     $templateName = TEMPLATE_ADMIN_BOX;
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_GroupList.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;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // 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';
     /*
      * 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);
     /*
      * Update any label tags ...
      */
     // example:
     $linkManager = new RowManager_NavBarLinksManager($this->navbarlink_id);
     $seriesKey = moduleNavBar::MULTILINGUAL_SERIES_KEY;
     $pageKey = $linkManager->getXMLNodeName();
     $groupMultiLingual = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new RowLabelBridge($linkManager, $groupMultiLingual);
     $name = $bridgeManager->getLabel();
     $this->labels->setLabelTag('[Title]', '[linkName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->navlinkaccessgroup_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * 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 = $this->dataManager->getXMLNodeName();
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'navlinkaccessgroup_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 NavLinkAccessGroupList( $this->navbarlink_id, $this->sortBy );
     $groupManager = new RowManager_NavLinkAccessGroupManager();
     $groupManager->setLinkID($this->navbarlink_id);
     $this->dataList = $groupManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     $accountGroupMgr = new RowManager_AccessGroupManager();
     $multiLingualContext = new MultilingualManager($this->viewer->getLanguageID());
     $rowLabelBridge = $accountGroupMgr->getRowLabelBridge($multiLingualContext);
     $accountList = $rowLabelBridge->getListIterator();
     $this->template->set("list_accessgroup_id", $accountList->getDropListArray());
     $templateName = TEMPLATE_ADMIN_BOX;
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_LinkGroups.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 ...
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $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_EditViewer::FORM_FIELD_TYPES);
     $this->template->set('formFieldType', $fieldTypes);
     // store the button label
     $this->template->set('buttonText', $this->labels->getLabel('[Update]'));
     /*
      * Add any additional data required by the template here
      */
     $languageManager = new RowManager_LanguageManager();
     $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;
     $pageKey = RowManager_LanguageManager::XML_NODE_NAME;
     $bridgeMultiLingualManager = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new LanguageLabelBridge($languageManager, $bridgeMultiLingualManager);
     $languageList = $bridgeManager->getListIterator();
     $languageArray = $languageList->getDropListArray();
     $this->template->set('list_language_id', $languageArray);
     // Account Group Drop List
     //        $accountGroupList = new AccountGroupList( 'accountgroup_key');
     $groupMgr = new RowManager_AccountGroupManager();
     $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;
     $pageKey = $groupMgr->getXMLNodeName();
     $groupMultiLingualManager = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new RowLabelBridge($groupMgr, $groupMultiLingualManager);
     $groupList = $bridgeManager->getListIterator();
     $accountGroupArray = $groupList->getDropListArray();
     $this->template->set('list_accountgroup_id', $accountGroupArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_EditViewer.php';
     // otherwise use the generic admin box template
     $templateName = 'siteFormSingle.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()
 {
     // 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_ViewerManager::XML_NODE_NAME);
     // store the field names being displayed
     $fieldNames = explode(',', page_AccountList::DISPLAY_FIELDS);
     $this->template->set('dataFieldList', $fieldNames);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'viewer_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_passWord]');
     $columnLabel = $this->labels->getLabel('[change]');
     $link = $this->linkValues['passWord'];
     $fieldName = 'viewer_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     $title = $this->labels->getLabel('[title_access]');
     $columnLabel = $this->labels->getLabel('[change]');
     $link = $this->linkValues['accessLink'];
     $fieldName = 'viewer_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:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $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...
      */
     // NOTE: Here we tell the templat to NOT display the Title & Instr
     // fields.  So we can display them in our own template later on...
     $this->template->set('disableHeading', true);
     // store language list for display
     //$languageList = new LanguageList();
     $languageManager = new RowManager_LanguageManager();
     $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;
     $pageKey = $languageManager->getXMLNodeName();
     $multiLingualManager = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new LanguageLabelBridge($languageManager, $multiLingualManager);
     $languageList = $bridgeManager->getListIterator();
     $languageArray = $languageList->getDropListArray();
     $this->template->set('list_language_id', $languageArray);
     $isActiveList = array();
     $isActiveList['1'] = $this->labels->getLabel('[yes]');
     $isActiveList['0'] = '&nbsp;';
     //$this->labels->getLabel( '[no]' );
     $this->template->set('list_viewer_isActive', $isActiveList);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_AccountList.php';
     $pageAccountList = $this->template->fetch($templateName);
     // Now create an instance of the page_AccountList template
     // and add the account List to it.
     $path = $this->pathModuleRoot . 'templates/';
     $template = new Template($path);
     $template->setXML('pageLabels', $this->labels->getLabelXML());
     $template->set('pageContent', $pageAccountList);
     // now add the data for the Account Group JumpList
     $groupMgr = new RowManager_AccountGroupManager();
     $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;
     $pageKey = $groupMgr->getXMLNodeName();
     $groupMultiLingualManager = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new RowLabelBridge($groupMgr, $groupMultiLingualManager);
     $groupList = $bridgeManager->getListIterator();
     $jumpLink = $this->linkValues['jumpLink'];
     $list = $groupList->getDropListArray(null, $jumpLink);
     $template->set('jumpList', $list);
     $template->set('accountGroup', $jumpLink . $this->accountgroup_id);
     // return template data.
     $templateName = 'page_AccountList.php';
     return $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/';
     $this->template = new Template($path);
     // store the form action information
     $this->template->set('formAction', $this->formAction);
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     // example:
     $account = new RowManager_ViewerManager($this->viewer_id);
     $name = $account->getUserID();
     $this->labels->setLabelTag('[Title]', '[viewerUserID]', $name);
     $this->labels->setLabelTag('[Instr]', '[viewerUserID]', $name);
     $this->template->setXML('pageLabels', $this->labels->getLabelXML());
     /*
      * Form related Template variables:
      */
     // compile list of Access Categories and Related Access Groups
     $categoryArray = array();
     $categoryManager = new RowManager_AccessCategoryManager();
     $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;
     $pageKey = $categoryManager->getXMLNodeName();
     $multilingualContext = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new RowLabelBridge($categoryManager, $multilingualContext);
     $groupMultiLingualContext = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, RowManager_AccessGroupManager::XML_NODE_NAME);
     $accessCategoryList = $bridgeManager->getListIterator();
     //        $accessCategoryList = new AccessCategoryList();
     $accessCategoryList->setFirst();
     while ($accessCategory = $accessCategoryList->getNext()) {
         //            $accessGroupList = new AccessGroupList( $accessCategory->getID() );
         $name = $accessCategory->getLabel();
         $groupManager = new RowManager_AccessGroupManager();
         $groupManager->setAccessCategoryID($accessCategory->getID());
         $bridgeManager = $groupManager->getRowLabelBridge($groupMultiLingualContext);
         $accessGroupList = $bridgeManager->getListIterator();
         $categoryArray[$name] = $accessGroupList->getDropListArray();
     }
     $this->template->set('accessCategories', $categoryArray);
     // load the current Groups associated with this account
     $this->template->set('currentGroups', $this->currentGroupList);
     $this->template->set('buttonText', $this->labels->getLabel('[Update]'));
     // return the HTML content for this page
     $templateName = 'page_AccountAccess.php';
     return $this->template->fetch($templateName);
 }