GridHandler::getRequestArgs PHP Méthode

getRequestArgs() public méthode

NB: You should make sure to authorize and/or validate parameters before you publish them through this interface. Callers will assume that data accessed through this method will not have to be sanitized. The default implementation tries to retrieve request parameters from a data provider if there is one.
public getRequestArgs ( ) : array
Résultat array
    function getRequestArgs()
    {
        $dataProvider = $this->getDataProvider();
        $requestArgs = array();
        if (is_a($dataProvider, 'GridDataProvider')) {
            $requestArgs = $dataProvider->getRequestArgs();
        }
        $this->callFeaturesHook('getRequestArgs', array('grid' => &$this, 'requestArgs' => &$requestArgs));
        return $requestArgs;
    }

Usage Example

 /**
  * @copydoc GridDataProvider::getRequestArgs()
  */
 function getRequestArgs()
 {
     $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
     $articleGalley = $this->getAuthorizedContextObject(ASSOC_TYPE_GALLEY);
     $requestArgs = (array) parent::getRequestArgs();
     $requestArgs['submissionId'] = $submission->getId();
     if ($articleGalley) {
         $requestArgs['representationId'] = $articleGalley->getId();
     }
     return $requestArgs;
 }
All Usage Examples Of GridHandler::getRequestArgs