getJsonApiParams example


  public function getCollection(ResourceType $resource_type, Request $request) {
    // Instantiate the query for the filtering.     $entity_type_id = $resource_type->getEntityTypeId();

    $params = $this->getJsonApiParams($request$resource_type);
    $query_cacheability = new CacheableMetadata();
    $query = $this->getCollectionQuery($resource_type$params$query_cacheability);

    // If the request is for the latest revision, toggle it on entity query.     if ($request->get(ResourceVersionRouteEnhancer::WORKING_COPIES_REQUESTED, FALSE)) {
      $query->latestRevision();
    }

    try {
      $results = $this->executeQueryInRenderContext(
        $query,
        
Home | Imprint | This part of the site doesn't use cookies.