34 public function __construct()
38 $this->clearingDao = $container->get(
'dao.clearing');
39 $this->licenseDao = $container->get(
'dao.license');
41 parent::__construct($groupBy =
'text');
44 protected function getStatements($uploadId, $uploadTreeTableName, $groupId = null)
46 $dbManager = $GLOBALS[
'container']->get(
'db.manager');
47 $licenseMap =
new LicenseMap($dbManager, $groupId, LicenseMap::REPORT,
true);
48 $mainLicIds = $this->clearingDao->getMainLicenseIds($uploadId, $groupId);
50 $allStatements = array();
51 foreach ($mainLicIds as $originLicenseId) {
52 $allLicenseCols = $this->licenseDao->getLicenseById($originLicenseId, $groupId);
53 $allStatements[] = array(
54 'licenseId' => $originLicenseId,
55 'risk' => $allLicenseCols->getRisk(),
56 'content' => $licenseMap->getProjectedShortname($originLicenseId),
57 'text' => $allLicenseCols->getText()
60 return $allStatements;
63 public function getCleared($uploadId, $groupId=null, $extended=
true, $agentcall=null, $isUnifiedReport=
false, $objectAgent)
65 $uploadTreeTableName = $this->uploadDao->getUploadtreeTableName($uploadId);
66 $statements = $this->getStatements($uploadId, $uploadTreeTableName, $groupId);
68 for ($i=0; $i<=count($statements); $i++) {
69 unset($statements[$i][
'risk']);
72 return array(
"statements" => array_values($statements));
Wrapper class for license map.