public function getReportHistoryDisplay($reportUri = null, $limitByCurrentUser = true, $options = array()) {
        //Call the load method with the given parameters
        if ($reportUri) {
            $history = $this->loadHistoryForReport($reportUri, $limitByCurrentUser, $options);
        } else {
            $history = $this->loadRecentHistory($limitByCurrentUser, $options);
        }

        //Create an array to hold the pieces
        $displayArray = array();

        //Foreach history record, prettify the selection and check that it is showable to the current user
        foreach($history as $record) {
            //If the return is false, skip the rest for this record as this user cannot view it at this time
            $recordArray = array();

            // //Get the input controls for the report
            // $inputControls = $this->clientService->getReportInputControls($record->getReportUri(), $this->clientService->getDefaultInputOptionsSource());

            // //Foreach input control match it with the prettified selections
            // $displayParams = array();
            // foreach($inputControls as $inputControl) {
            //     var_dump($params); die;
            //     if (isset($params[$inputControl->getId()])) {
            //         $displayParams[$inputControl->getLabel()] = $params[$inputControl->getId()];
            //     } else {
            //         $displayParams[$inputControl->getLabel()] = array(' ~ ');
            //     }
            // }

            //Convert the columns parameter into something easier to read
            $params = $this->prettifyParameters($record->getReportUri(), json_decode($record->getParameters(), true));

            //Fill out the rest of the
            $recordArray['report'] = $record->getReportUri();
            $recordArray['requestId'] = $record->getRequestId();
            $recordArray['date'] = $record->getDate();
            $recordArray['username'] = $record->getUsername();
            $recordArray['status'] = $record->getStatus();
            $recordArray['formats'] = $record->getFormats();
            $recordArray['parameters'] = $params;

            //Add the record array to the display array
            $displayArray[] = $recordArray;
        }

        //Return the display friendly array
        return $displayArray;
    }
public function getReportHistoryDisplay($reportUri = null, $limitByCurrentUser = true, $options = array()) {
        //Call the load method with the given parameters
        if ($reportUri) {
            $history = $this->loadHistoryForReport($reportUri, $limitByCurrentUser, $options);
        } else {
            $history = $this->loadRecentHistory($limitByCurrentUser, $options);
        }

        //Create an array to hold the pieces
        $displayArray = array();

        //Foreach history record, prettify the selection and check that it is showable to the current user
        foreach($history as $record) {
            //If the return is false, skip the rest for this record as this user cannot view it at this time
            $recordArray = array();

            // //Get the input controls for the report
            // $inputControls = $this->clientService->getReportInputControls($record->getReportUri(), $this->clientService->getDefaultInputOptionsSource());

            // //Foreach input control match it with the prettified selections
            // $displayParams = array();
            // foreach($inputControls as $inputControl) {
            //     var_dump($params); die;
            //     if (isset($params[$inputControl->getId()])) {
            //         $displayParams[$inputControl->getLabel()] = $params[$inputControl->getId()];
            //     } else {
            //         $displayParams[$inputControl->getLabel()] = array(' ~ ');
            //     }
            // }

            //Convert the columns parameter into something easier to read
            $params = $this->prettifyParameters($record->getReportUri(), json_decode($record->getParameters(), true));

            //Fill out the rest of the
            $recordArray['report'] = $record->getReportUri();
            $recordArray['requestId'] = $record->getRequestId();
            $recordArray['date'] = $record->getDate();
            $recordArray['username'] = $record->getUsername();
            $recordArray['status'] = $record->getStatus();
            $recordArray['formats'] = $record->getFormats();
            $recordArray['parameters'] = $params;

            //Add the record array to the display array
            $displayArray[] = $recordArray;
        }

        //Return the display friendly array
        return $displayArray;
    }
public function getReportHistoryDisplay ( $ reportUri = null , $ limitByCurrentUser = true , $ options = array ( ) ) { //Call the load method with the given parameters if ( $ reportUri ) { $ history = $ this -> loadHistoryForReport ( $ reportUri , $ limitByCurrentUser , $ options ) ; } else { $ history = $ this -> loadRecentHistory ( $ limitByCurrentUser , $ options ) ; } //Create an array to hold the pieces $ displayArray = array ( ) ; //Foreach history record, prettify the selection and check that it is showable to the current user foreach ( $ history as $ record ) { //If the return is false, skip the rest for this record as this user cannot view it at this time $ recordArray = array ( ) ; // //Get the input controls for the report // $inputControls = $this->clientService->getReportInputControls($record->getReportUri(), $this->clientService->getDefaultInputOptionsSource()); // //Foreach input control match it with the prettified selections // $displayParams = array(); // foreach($inputControls as $inputControl) { //     var_dump($params); die; //     if (isset($params[$inputControl->getId()])) { //         $displayParams[$inputControl->getLabel()] = $params[$inputControl->getId()]; //     } else { //         $displayParams[$inputControl->getLabel()] = array(' ~ '); //     } // } //Convert the columns parameter into something easier to read $ params = $ this -> prettifyParameters ( $ record -> getReportUri ( ) , json_decode ( $ record -> getParameters ( ) , true ) ) ; //Fill out the rest of the $ recordArray [ 'report' ] = $ record -> getReportUri ( ) ; $ recordArray [ 'requestId' ] = $ record -> getRequestId ( ) ; $ recordArray [ 'date' ] = $ record -> getDate ( ) ; $ recordArray [ 'username' ] = $ record -> getUsername ( ) ; $ recordArray [ 'status' ] = $ record -> getStatus ( ) ; $ recordArray [ 'formats' ] = $ record -> getFormats ( ) ; $ recordArray [ 'parameters' ] = $ params ; //Add the record array to the display array $ displayArray [ ] = $ recordArray ; } //Return the display friendly array return $ displayArray ; }
Gets history records for a particular report or all reports and places them in more display friendly fashion

@param  string  $reportUri          The uri of the report to get records for, if null, all reports will be grabbed
@param  boolean $limitByCurrentUser Whether to limit the return by only records associated with the current user
@param  options $options            Additional options for the report history repository filter call

@return array                       The array of report history records
Gets history records for a particular report or all reports and places them in more display friendly fashion