Function __global->cns_read_in_topic

Definitions

sources/cns_topicview.php

  • Read in a great big map of details relating to a topic.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$topic_id ?AUTO_LINK No No required parameter N/A N/A The ID of the topic we are getting details of (null: whispers)
$start integer No No required parameter N/A N/A The start row for getting details of posts in the topic (i.e. 0 is start of topic, higher is further through).
$max integer No No required parameter N/A N/A The maximum number of posts to get detail of
$view_poll_results boolean No No False N/A N/A Whether we are viewing poll results for the topic (if there is no poll for the topic, this is irrelevant)
$check_perms boolean No No True N/A N/A Whether to check permissions

Returns

  • The map of details
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Read in a great big map of details relating to a topic.
 *
 * @param  ?AUTO_LINK $topic_id The ID of the topic we are getting details of (null: whispers)
 * @param  integer $start The start row for getting details of posts in the topic (i.e. 0 is start of topic, higher is further through).
 * @param  integer $max The maximum number of posts to get detail of
 * @param  boolean $view_poll_results Whether we are viewing poll results for the topic (if there is no poll for the topic, this is irrelevant)
 * @param  boolean $check_perms Whether to check permissions
 * @return array The map of details
 */

function cns_read_in_topic(?int $topic_id, int $start, int $max, bool $view_poll_results = false, bool $check_perms = true) : array