public function getDetails(Request $request, $databox_id)
    {
        $databox = $this->findDataboxById($databox_id);

        $details = [];
        $total = ['total_subdefs' => 0, 'total_size' => 0];

        foreach ($databox->get_record_details($request->query->get('sort')) as $collName => $colDetails) {
            $details[$collName] = [
                'total_subdefs' => 0,
                'total_size' => 0,
                'medias' => []
            ];

            foreach ($colDetails as $subdefName => $subdefDetails) {
                $details[$collName]['total_subdefs'] += $subdefDetails['n'];
                $total['total_subdefs'] += $subdefDetails['n'];
                $details[$collName]['total_size'] += $subdefDetails['siz'];
                $total['total_size'] += $subdefDetails['siz'];

                $details[$collName]['medias'][] = [
                    'subdef_name' => $subdefName,
                    'total_subdefs' => $subdefDetails['n'],
                    'total_size' => $subdefDetails['siz'],
                ];
            }
        }

        return $this->render('admin/databox/details.html.twig', [
            'databox' => $databox,
            'table'   => $details,
            'total'   => $total
        ]);
    }
public function getDetails(Request $request, $databox_id)
    {
        $databox = $this->findDataboxById($databox_id);

        $details = [];
        $total = ['total_subdefs' => 0, 'total_size' => 0];

        foreach ($databox->get_record_details($request->query->get('sort')) as $collName => $colDetails) {
            $details[$collName] = [
                'total_subdefs' => 0,
                'total_size' => 0,
                'medias' => []
            ];

            foreach ($colDetails as $subdefName => $subdefDetails) {
                $details[$collName]['total_subdefs'] += $subdefDetails['n'];
                $total['total_subdefs'] += $subdefDetails['n'];
                $details[$collName]['total_size'] += $subdefDetails['siz'];
                $total['total_size'] += $subdefDetails['siz'];

                $details[$collName]['medias'][] = [
                    'subdef_name' => $subdefName,
                    'total_subdefs' => $subdefDetails['n'],
                    'total_size' => $subdefDetails['siz'],
                ];
            }
        }

        return $this->render('admin/databox/details.html.twig', [
            'databox' => $databox,
            'table'   => $details,
            'total'   => $total
        ]);
    }
public function getDetails ( Request $ request , $ databox_id ) { $ databox = $ this -> findDataboxById ( $ databox_id ) ; $ details = [ ] ; $ total = [ 'total_subdefs' => 0 , 'total_size' => 0 ] ; foreach ( $ databox -> get_record_details ( $ request -> query -> get ( 'sort' ) ) as $ collName => $ colDetails ) { $ details [ $ collName ] = [ 'total_subdefs' => 0 , 'total_size' => 0 , 'medias' => [ ] ] ; foreach ( $ colDetails as $ subdefName => $ subdefDetails ) { $ details [ $ collName ] [ 'total_subdefs' ] += $ subdefDetails [ 'n' ] ; $ total [ 'total_subdefs' ] += $ subdefDetails [ 'n' ] ; $ details [ $ collName ] [ 'total_size' ] += $ subdefDetails [ 'siz' ] ; $ total [ 'total_size' ] += $ subdefDetails [ 'siz' ] ; $ details [ $ collName ] [ 'medias' ] [ ] = [ 'subdef_name' => $ subdefName , 'total_subdefs' => $ subdefDetails [ 'n' ] , 'total_size' => $ subdefDetails [ 'siz' ] , ] ; } } return $ this -> render ( 'admin/databox/details.html.twig' , [ 'databox' => $ databox , 'table' => $ details , 'total' => $ total ] ) ; }
Display page to get some details on a appbox

@param  Request $request    The current HTTP request
@param  integer $databox_id The requested databox
@return Response
Display page to get some details on a appbox