/** * function isDataValid * <pre> * Verifies the returned data is valid. * </pre> * @return [BOOL] */ function isDataValid() { $isValid = parent::isDataValid(); /* * check here for specific cases not covered by simple Field * Definitions. */ // Example : error checking // NOTE: a custom error label [error_UniqueModuleName] is used // for the error. This error label is created in the Page Labels // form. // Make sure that module name doesn't already exist... // if ($isValid) { // $isValid = $this->dataManager->isUniqueModuleName(); // $this->formErrors[ 'module_name' ] = $this->labels->getLabel( '[error_UniqueModuleName]'); /// } // now return result return $isValid; }
/** * function setLinks * <pre> * Sets the value of the linkValues array. * </pre> * @param $links [ARRAY] Array of Link Values * @return [void] */ function setLinks($links) { $dataAccessManager = new RowManager_EditCampusAssignmentManager(); $dataAccessManager->setPersonID($this->person_id); $dataAccessManager->setCampusID($this->campus_id); $dataAccessManager->setSortOrder($this->sortBy); $dataList = $dataAccessManager->getListIterator(); $displayedValues = $dataList->getDataList(); // disallow the 'continue' link if there is no campus assignment data recorded for this person if (count($displayedValues) == 0) { $baseLink = $links['edit']; $baseLink = str_replace(modulecim_reg::ASSIGNMENT_ID . '=', '', $baseLink); $links['cont'] = $baseLink; } parent::setLinks($links); }