protected function loadSubtable($dataTable, $row)
    {
        if (!($this->apiModule && $this->apiMethod && count($this->request))) {
            return null;
        }

        $request = $this->request;

        $idSubTable = $row->getIdSubDataTable();
        if ($idSubTable === null) {
            return null;
        }

        $request['idSubtable'] = $idSubTable;
        if ($dataTable) {
            $period = $dataTable->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX);
            if ($period instanceof Range) {
                $request['date'] = $period->getDateStart() . ',' . $period->getDateEnd();
            } else {
                $request['date'] = $period->getDateStart()->toString();
            }
        }

        $method = $this->getApiMethodForSubtable($request);
        return $this->callApiAndReturnDataTable($this->apiModule, $method, $request);
    }
protected function loadSubtable($dataTable, $row)
    {
        if (!($this->apiModule && $this->apiMethod && count($this->request))) {
            return null;
        }

        $request = $this->request;

        $idSubTable = $row->getIdSubDataTable();
        if ($idSubTable === null) {
            return null;
        }

        $request['idSubtable'] = $idSubTable;
        if ($dataTable) {
            $period = $dataTable->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX);
            if ($period instanceof Range) {
                $request['date'] = $period->getDateStart() . ',' . $period->getDateEnd();
            } else {
                $request['date'] = $period->getDateStart()->toString();
            }
        }

        $method = $this->getApiMethodForSubtable($request);
        return $this->callApiAndReturnDataTable($this->apiModule, $method, $request);
    }
protected function loadSubtable ( $ dataTable , $ row ) { if ( ! ( $ this -> apiModule && $ this -> apiMethod && count ( $ this -> request ) ) ) { return null ; } $ request = $ this -> request ; $ idSubTable = $ row -> getIdSubDataTable ( ) ; if ( $ idSubTable === null ) { return null ; } $ request [ 'idSubtable' ] = $ idSubTable ; if ( $ dataTable ) { $ period = $ dataTable -> getMetadata ( DataTableFactory :: TABLE_METADATA_PERIOD_INDEX ) ; if ( $ period instanceof Range ) { $ request [ 'date' ] = $ period -> getDateStart ( ) . ',' . $ period -> getDateEnd ( ) ; } else { $ request [ 'date' ] = $ period -> getDateStart ( ) -> toString ( ) ; } } $ method = $ this -> getApiMethodForSubtable ( $ request ) ; return $ this -> callApiAndReturnDataTable ( $ this -> apiModule , $ method , $ request ) ; }
Load the subtable for a row.
Returns null if none is found.

@param DataTable $dataTable
@param Row $row

@return DataTable
Load the subtable for a row . Returns null if none is found .