public function getResultsData(DeliveryExecutionInterface $deliveryExecution)
    {
        $result = [];
        $resultService = $this->getResultService($deliveryExecution->getDelivery());

        $itemsData = $resultService->getItemVariableDataFromDeliveryResult($deliveryExecution->getIdentifier(), 'lastSubmitted');

        foreach ($itemsData as $itemData) {
            $rawResult = [];
            $rawResult['label'] = $itemData['label'];
            foreach ($itemData['sortedVars'] as $variables) {
                $variableValues = array_map(function ($variable) {
                    $variable = current($variable);
                    return $variable['var']->getValue();
                }, $variables);
                $rawResult = array_merge($rawResult, $variableValues);
            };
            $result[] = $rawResult;
        }
        return $result;
    }
public function getResultsData(DeliveryExecutionInterface $deliveryExecution)
    {
        $result = [];
        $resultService = $this->getResultService($deliveryExecution->getDelivery());

        $itemsData = $resultService->getItemVariableDataFromDeliveryResult($deliveryExecution->getIdentifier(), 'lastSubmitted');

        foreach ($itemsData as $itemData) {
            $rawResult = [];
            $rawResult['label'] = $itemData['label'];
            foreach ($itemData['sortedVars'] as $variables) {
                $variableValues = array_map(function ($variable) {
                    $variable = current($variable);
                    return $variable['var']->getValue();
                }, $variables);
                $rawResult = array_merge($rawResult, $variableValues);
            };
            $result[] = $rawResult;
        }
        return $result;
    }
public function getResultsData ( DeliveryExecutionInterface $ deliveryExecution ) { $ result = [ ] ; $ resultService = $ this -> getResultService ( $ deliveryExecution -> getDelivery ( ) ) ; $ itemsData = $ resultService -> getItemVariableDataFromDeliveryResult ( $ deliveryExecution -> getIdentifier ( ) , 'lastSubmitted' ) ; foreach ( $ itemsData as $ itemData ) { $ rawResult = [ ] ; $ rawResult [ 'label' ] = $ itemData [ 'label' ] ; foreach ( $ itemData [ 'sortedVars' ] as $ variables ) { $ variableValues = array_map ( function ( $ variable ) { $ variable = current ( $ variable ) ; return $ variable [ 'var' ] -> getValue ( ) ; } , $ variables ) ; $ rawResult = array_merge ( $ rawResult , $ variableValues ) ; } ; $ result [ ] = $ rawResult ; } return $ result ; }
Get session results
@param DeliveryExecutionInterface $deliveryExecution
@return array
Get session results