29 private $DNUFilesOnly;
31 public function __construct($DNUFilesOnly=
true)
33 $this->clearingDao = $GLOBALS[
'container']->get(
'dao.clearing');
34 $this->DNUFilesOnly = $DNUFilesOnly;
35 parent::__construct($groupBy =
'text');
44 protected function getStatements($uploadId, $uploadTreeTableName, $groupId=null)
46 $itemTreeBounds = $this->uploadDao->getParentItemBounds($uploadId,$uploadTreeTableName);
47 return $this->clearingDao->getFilesForDecisionTypeFolderLevel($itemTreeBounds, $groupId,
true,
'doNotUse');
55 protected function groupStatements($ungrupedStatements, $extended, $agentcall, $isUnifiedReport, $objectAgent)
57 $statements = array();
58 foreach ($ungrupedStatements as $statement) {
59 $fileName = $statement[
'fileName'];
60 $dirName = dirname($statement[
'fileName']);
61 $baseName = basename($statement[
'fileName']);
62 $comment = $statement[
'comment'];
63 $licenseName = $statement[
'shortname'];
64 if ($this->DNUFilesOnly) {
65 if (array_key_exists($fileName, $statements)) {
66 $currentLics = &$statements[$fileName][
"licenses"];
67 if (! in_array($licenseName, $currentLics)) {
68 $currentLics[] = $licenseName;
71 $statements[$fileName] = array(
73 "fileName" => $baseName,
74 "licenses" => array($licenseName)
79 $statements[] = array(
80 "content" => $licenseName,
82 "files" => array($fileName)
86 $objectAgent->heartbeat(1);
88 return array(
"statements" => array_values($statements));
getStatements($uploadId, $uploadTreeTableName, $groupId=null)
if(!defined('ENT_SUBSTITUTE')) convertToUTF8($content, $toHTML=true)
groupStatements($ungrupedStatements, $extended, $agentcall, $isUnifiedReport, $objectAgent)