/** * Disables sorting. * * If the current request contains sorting criteria, it throws a SortingNotSupported exception. * * @throws \WoohooLabs\Yin\JsonApi\Exception\SortingUnsupported */ public function disableSorting() { if ($this->request->getQueryParam("sort") !== null) { throw $this->exceptionFactory->createSortingUnsupportedException($this->request); } }