Skip to content

Commit fa25bb2

Browse files
author
Vítězslav Dvořák
committed
Update for AbraFlexi 2024.7.1
1 parent d309ced commit fa25bb2

File tree

256 files changed

+19769
-17470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+19769
-17470
lines changed

src/AbraFlexi/Actions.php

Lines changed: 10483 additions & 9635 deletions
Large diffs are not rendered by default.

src/AbraFlexi/EvidenceList.php

Lines changed: 3310 additions & 2992 deletions
Large diffs are not rendered by default.

src/AbraFlexi/Formats.php

Lines changed: 2397 additions & 1867 deletions
Large diffs are not rendered by default.

src/AbraFlexi/RO.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,31 @@ public function getAllFromAbraFlexi($conditions = null, $indexBy = null)
18981898
return $flexiData;
18991899
}
19001900

1901+
/**
1902+
* Get Summary.
1903+
*
1904+
* @param array<string> $fields with summary ability
1905+
* @param array<string|string> $conditions
1906+
*
1907+
* @throws \InvalidArgumentException - when requested field does not support summmarization
1908+
*
1909+
* @return array
1910+
*/
1911+
public function getSumsFromAbraFlexi(
1912+
array $fields,
1913+
array $conditions = [],
1914+
) {
1915+
foreach ($fields as $field) {
1916+
if ($this->getColumnInfo($field)['inSummary'] === 'false') {
1917+
throw new \InvalidArgumentException(_('Column %s do not support summarization'));
1918+
}
1919+
}
1920+
1921+
$conditions['fields'] = implode(',', array_unique($fields));
1922+
1923+
return $this->getFlexiData('$sum', $conditions);
1924+
}
1925+
19011926
/**
19021927
* Vrací z AbraFlexi sloupečky podle podmínek.
19031928
*

0 commit comments

Comments
 (0)