Function __global->_helper_get_forum_topic_posts

Definitions

sources/cns_forum_driver_helper.php

  • Get an array of maps for the topic in the given forum.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$this_ref object No No required parameter N/A N/A Link to the real forum driver
$topic_id ?integer No No required parameter N/A N/A The topic ID (null: does not exist)
&$count ?integer Yes No required parameter N/A N/A The comment count will be returned here by reference (null: no return)
$max ?integer No No required parameter N/A N/A Maximum comments to returned (null: no limit)
$start integer No No required parameter N/A N/A Comment to start at
$mark_read boolean No No True N/A N/A Whether to mark the topic read
$reverse boolean No No False N/A N/A Whether to show in reverse
$light_if_threaded boolean No No False N/A N/A Whether to only load minimal details if it is a threaded topic
$post_ids ?array No No Null N/A N/A List of post IDs to load (null: no filter)
$load_spacer_posts_too boolean No No False N/A N/A Whether to load spacer posts
$sort ID_TEXT No No date date compound_rating average_rating N/A Preferred sort order (appropriate will use rating if threaded, other

Returns

  • The array of maps (Each map is: title, message, member, date) (-1 for no such forum, -2 for no such topic)
  • Type: mixed
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get an array of maps for the topic in the given forum.
 *
 * @param  object $this_ref Link to the real forum driver
 * @param  ?integer $topic_id The topic ID (null: does not exist)
 * @param  ?integer $count The comment count will be returned here by reference (null: no return)
 * @param  ?integer $max Maximum comments to returned (null: no limit)
 * @param  integer $start Comment to start at
 * @param  boolean $mark_read Whether to mark the topic read
 * @param  boolean $reverse Whether to show in reverse
 * @param  boolean $light_if_threaded Whether to only load minimal details if it is a threaded topic
 * @param  ?array $post_ids List of post IDs to load (null: no filter)
 * @param  boolean $load_spacer_posts_too Whether to load spacer posts
 * @param  ID_TEXT $sort Preferred sort order (appropriate will use rating if threaded, other
 * @set date compound_rating average_rating
 * @return mixed The array of maps (Each map is: title, message, member, date) (-1 for no such forum, -2 for no such topic)
 */

function _helper_get_forum_topic_posts(object $this_ref, ?int $topic_id, ?int &$count, ?int $max, int $start, bool $mark_read = true, bool $reverse = false, bool $light_if_threaded = false, ?array $post_ids = null, bool $load_spacer_posts_too = false, string $sort = 'date')