Function CMS_Topic->_grab_at_and_underneath

Definitions

sources/topics.php

  • Grab posts at or underneath a reference post.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$parent_post_id ?AUTO_LINK No No required parameter N/A N/A Reference post in thread (null: root)
$posts_in array No No required parameter N/A N/A Posts to choose from

Returns

  • Relevant posts
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Grab posts at or underneath a reference post.
 *
 * @param  ?AUTO_LINK $parent_post_id Reference post in thread (null: root)
 * @param  array $posts_in Posts to choose from
 * @return array Relevant posts
 */

protected function _grab_at_and_underneath(?int $parent_post_id, array $posts_in) : array