Function CMS_Topic->load_from_topic

Definitions

sources/topics.php

  • Load from a given topic ID.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$topic_id ?AUTO_LINK No No required parameter N/A N/A Topic ID (null: none yet, set up empty structure)
$num_to_show_limit integer No No required parameter N/A N/A Maximum to load
$start integer No No 0 N/A N/A Pagination start if non-threaded
$reverse ?boolean No No Null N/A N/A Whether to show in reverse date order (affects default search order only) (null: read config)
$posts ?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 allow spacer posts to flow through the renderer

Returns

  • Success status
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Load from a given topic ID.
 *
 * @param  ?AUTO_LINK $topic_id Topic ID (null: none yet, set up empty structure)
 * @param  integer $num_to_show_limit Maximum to load
 * @param  integer $start Pagination start if non-threaded
 * @param  ?boolean $reverse Whether to show in reverse date order (affects default search order only) (null: read config)
 * @param  ?array $posts List of post IDs to load (null: no filter)
 * @param  boolean $load_spacer_posts_too Whether to allow spacer posts to flow through the renderer
 * @return boolean Success status
 */

public function load_from_topic(?int $topic_id, int $num_to_show_limit, int $start = 0, ?bool $reverse = null, ?array $posts = null, bool $load_spacer_posts_too = false) : bool