getUser($request))) { throw new AuthorizationFailedException(); } list($offset, $limit) = $this->getOffsetAndLimit(); $total = \StockImage::countBySQL('1'); $stockImages = \StockImage::findBySQL("1 ORDER BY title ASC LIMIT {$offset}, {$limit}"); return $this->getPaginatedContentResponse($stockImages, $total); } }