public function getAllPostsOfCategory($lang, $postType, $categoryID)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess($postType, 'read')) {
            return $this->noPermission();
        }
        // order info
        $orderBy = (isset($_GET['order'])) ? $_GET['order'] : 'postID';
        $orderType = (isset($_GET['type'])) ? $_GET['type'] : 'DESC';

        // get postIDs from relations
        $relations = DB::table(categoriesRelationTable($postType))->where('categoryID', $categoryID)->select('postID')->get();
        $postIDs = [];
        foreach ($relations as $postID){
            $postIDs[] = $postID->postID;
        }
        // get post list
        $list = DB::table($postType)->whereIn('postID', $postIDs)->orderBy($orderBy, $orderType)->paginate(Post::$rowsPerPage);
        return Language::filterRows($list);
    }