Zepi/Web/UserInterface/src/Renderer/Table.php
protected function generateDataRequest(WebRequest $request, TableAbstract $table, $numberOfEntries)
    {
        $sortBy = 'name';
        $sortByDirection = 'ASC';
        
        // If the session has a data request object for the table, load it and refresh the data.
        $savedDataRequestKey = get_class($table) . '.DataRequest.Saved';
        $dataRequest = false;
        if ($table->shouldSaveDataRequest() && $request->getSessionData($savedDataRequestKey) !== false) {
            $dataRequest = unserialize($request->getSessionData($savedDataRequestKey));
        }
        
        // Check if the data request is valid
        if ($dataRequest === false) {
            $dataRequest = new DataRequest(1, $numberOfEntries, $sortBy, $sortByDirection);
        }
        
        // Save the data request to the session if needed
        if ($table->shouldSaveDataRequest()) {
            $request->setSessionData($savedDataRequestKey, serialize($dataRequest));
        }

        return $dataRequest;
    }
protected function generateDataRequest(WebRequest $request, TableAbstract $table, $numberOfEntries)
    {
        $sortBy = 'name';
        $sortByDirection = 'ASC';
        
        // If the session has a data request object for the table, load it and refresh the data.
        $savedDataRequestKey = get_class($table) . '.DataRequest.Saved';
        $dataRequest = false;
        if ($table->shouldSaveDataRequest() && $request->getSessionData($savedDataRequestKey) !== false) {
            $dataRequest = unserialize($request->getSessionData($savedDataRequestKey));
        }
        
        // Check if the data request is valid
        if ($dataRequest === false) {
            $dataRequest = new DataRequest(1, $numberOfEntries, $sortBy, $sortByDirection);
        }
        
        // Save the data request to the session if needed
        if ($table->shouldSaveDataRequest()) {
            $request->setSessionData($savedDataRequestKey, serialize($dataRequest));
        }

        return $dataRequest;
    }
protected function generateDataRequest ( WebRequest $ request , TableAbstract $ table , $ numberOfEntries ) { $ sortBy = 'name' ; $ sortByDirection = 'ASC' ; // If the session has a data request object for the table, load it and refresh the data. $ savedDataRequestKey = get_class ( $ table ) . '.DataRequest.Saved' ; $ dataRequest = false ; if ( $ table -> shouldSaveDataRequest ( ) && $ request -> getSessionData ( $ savedDataRequestKey ) !== false ) { $ dataRequest = unserialize ( $ request -> getSessionData ( $ savedDataRequestKey ) ) ; } // Check if the data request is valid if ( $ dataRequest === false ) { $ dataRequest = new DataRequest ( 1 , $ numberOfEntries , $ sortBy , $ sortByDirection ) ; } // Save the data request to the session if needed if ( $ table -> shouldSaveDataRequest ( ) ) { $ request -> setSessionData ( $ savedDataRequestKey , serialize ( $ dataRequest ) ) ; } return $ dataRequest ; }
Generates a DataRequest object

@access protected
@param \Zepi\Turbo\Request\WebRequest $request
@param \Zepi\Web\UserInterface\Table\TableAbstract $table
@param false|integer $numberOfEntries
@return \Zepi\Web\UserInterface\Table\DataRequest
Generates a DataRequest object