src/DataProvider/Pagination.php
private function getEnabled(array $context, string $resourceClass = null, string $operationName = null, bool $partial = false): bool
    {
        $enabled = $this->options[$partial ? 'partial' : 'enabled'];
        $clientEnabled = $this->options[$partial ? 'client_partial' : 'client_enabled'];

        if (null !== $resourceClass) {
            $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
            $enabled = $resourceMetadata->getCollectionOperationAttribute($operationName, $partial ? 'pagination_partial' : 'pagination_enabled', $enabled, true);

            $clientEnabled = $resourceMetadata->getCollectionOperationAttribute($operationName, $partial ? 'pagination_client_partial' : 'pagination_client_enabled', $clientEnabled, true);
        }

        if ($clientEnabled) {
            return filter_var($this->getParameterFromContext($context, $this->options[$partial ? 'partial_parameter_name' : 'enabled_parameter_name'], $enabled), FILTER_VALIDATE_BOOLEAN);
        }

        return $enabled;
    }
private function getEnabled(array $context, string $resourceClass = null, string $operationName = null, bool $partial = false): bool
    {
        $enabled = $this->options[$partial ? 'partial' : 'enabled'];
        $clientEnabled = $this->options[$partial ? 'client_partial' : 'client_enabled'];

        if (null !== $resourceClass) {
            $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
            $enabled = $resourceMetadata->getCollectionOperationAttribute($operationName, $partial ? 'pagination_partial' : 'pagination_enabled', $enabled, true);

            $clientEnabled = $resourceMetadata->getCollectionOperationAttribute($operationName, $partial ? 'pagination_client_partial' : 'pagination_client_enabled', $clientEnabled, true);
        }

        if ($clientEnabled) {
            return filter_var($this->getParameterFromContext($context, $this->options[$partial ? 'partial_parameter_name' : 'enabled_parameter_name'], $enabled), FILTER_VALIDATE_BOOLEAN);
        }

        return $enabled;
    }
private function getEnabled ( array $ context , string $ resourceClass = null , string $ operationName = null , bool $ partial = false ) : bool { $ enabled = $ this -> options [ $ partial ? 'partial' : 'enabled' ] ; $ clientEnabled = $ this -> options [ $ partial ? 'client_partial' : 'client_enabled' ] ; if ( null !== $ resourceClass ) { $ resourceMetadata = $ this -> resourceMetadataFactory -> create ( $ resourceClass ) ; $ enabled = $ resourceMetadata -> getCollectionOperationAttribute ( $ operationName , $ partial ? 'pagination_partial' : 'pagination_enabled' , $ enabled , true ) ; $ clientEnabled = $ resourceMetadata -> getCollectionOperationAttribute ( $ operationName , $ partial ? 'pagination_client_partial' : 'pagination_client_enabled' , $ clientEnabled , true ) ; } if ( $ clientEnabled ) { return filter_var ( $ this -> getParameterFromContext ( $ context , $ this -> options [ $ partial ? 'partial_parameter_name' : 'enabled_parameter_name' ] , $ enabled ) , FILTER_VALIDATE_BOOLEAN ) ; } return $ enabled ; }
Is the classic or partial pagination enabled?
Is the classic or partial pagination enabled?