29 public function __construct()
32 $this->clearingDao = $container->get(
'dao.clearing');
33 parent::__construct($groupBy =
"bulkId");
36 protected function getStatements($uploadId, $uploadTreeTableName, $groupId=0)
40 $parentTreeBounds = $this->uploadDao->getParentItemBounds($uploadId, $uploadTreeTableName);
41 $bulkHistory = $this->clearingDao->getBulkHistory($parentTreeBounds, $groupId,
false);
43 foreach ($bulkHistory as $bulk) {
45 $bulkId = $bulk[
'bulkId'];
46 foreach ($bulk[
'removedLicenses'] as $removedLics) {
47 $allLicenses .= ($removedLics ?
"[remove] " :
"") . $removedLics.
', ';
49 foreach ($bulk[
'addedLicenses'] as $addedLics) {
50 $allLicenses .= ($addedLics ?
"[add] " :
"") . $addedLics.
', ';
52 $allLicenses =
trim($allLicenses,
', ');
53 $content = $bulk[
'text'];
55 foreach ($this->clearingDao->getBulkMatches($bulkId, $groupId) as $bulkMatch) {
56 $uploadTreeId = $bulkMatch[
'itemid'];
60 'content' => $content,
61 'textfinding' => $allLicenses,
62 'description' => $content,
63 'uploadtree_pk' => $uploadTreeId
char * trim(char *ptext)
Trimming whitespace.