MCPcopy Create free account
hub / github.com/Rello/analytics / evaluateCanFilter

Method evaluateCanFilter

lib/Controller/OutputController.php:345–356  ·  view source on GitHub ↗

* evaluate if the user did filter in the report and if he is allowed to filter (shared reports) * * @param $metadata * @param $filteroptions * @param $dataoptions * @param $chartoptions * @param $tableoptions * @return mixed */

($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions)

Source from the content-addressed store, hash-verified

343 * @return mixed
344 */
345 private function evaluateCanFilter($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions) {
346 // send current user filter options to the data request
347 // only if the report has update-permissions
348 // if nothing is changed by the user, the filter which is stored for the report, will be used
349 if ($filteroptions and $filteroptions !== '' and (int)$metadata['permissions'] === Constants::PERMISSION_UPDATE) {
350 $metadata['filteroptions'] = $filteroptions;
351 $metadata['dataoptions'] = $dataoptions;
352 $metadata['chartoptions'] = $chartoptions;
353 $metadata['tableoptions'] = $tableoptions;
354 }
355 return $metadata;
356 }
357
358
359 /**

Callers 2

readMethod · 0.95
readPublicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected