Ejemplo n.º 1
0
 private function checkDecisionScopes()
 {
     $decScopes = new DecisionScopes();
     $scopeMap = $decScopes->getMap();
     $this->errors += $this->checkDatabaseEnum($tablename = 'clearing_decision', 'scope', $scopeMap);
     $decTypes = new DecisionTypes();
     $typeMap = $decTypes->getExtendedMap();
     $this->errors += $this->checkDatabaseEnum($tablename = 'clearing_decision', 'decision_type', $typeMap);
 }
Ejemplo n.º 2
0
 /**
  * @param ClearingDecision[] $clearingDecWithLicenses
  * @return array
  */
 private function getClearingHistory($clearingDecWithLicenses)
 {
     $table = array();
     $scope = new DecisionScopes();
     foreach ($clearingDecWithLicenses as $clearingDecision) {
         $licenseOutputs = array();
         foreach ($clearingDecision->getClearingLicenses() as $lic) {
             $shortName = $lic->getShortName();
             $licenseOutputs[$shortName] = $lic->isRemoved() ? "<span style=\"color:red\">{$shortName}</span>" : $shortName;
         }
         ksort($licenseOutputs, SORT_STRING);
         $row = array('date' => $clearingDecision->getTimeStamp(), 'username' => $clearingDecision->getUserName(), 'scope' => $scope->getTypeName($clearingDecision->getScope()), 'type' => $this->decisionTypes->getTypeName($clearingDecision->getType()), 'licenses' => implode(", ", $licenseOutputs));
         $table[] = $row;
     }
     return $table;
 }