Function CMS_Topic->render_as_comment_topic

Definitions

sources/topics.php

  • Render a comment topic.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ID_TEXT No No required parameter N/A N/A Content type to show topic for
$content_id ID_TEXT No No required parameter N/A N/A Content ID of content type to show topic for
$invisible_if_no_comments boolean No No required parameter N/A N/A Whether the comment box will be invisible if there are not yet any comments (and you're not staff)
$forum_name ?string No No required parameter N/A N/A The name of the forum to use (null: default comment forum)
$post_warning ?string No No required parameter N/A N/A The default post to use (null: standard courtesy warning)
$preloaded_comments ?mixed No No required parameter N/A N/A The raw comment array (null: lookup). This is useful if we want to pass it through a filter
$reverse ?boolean No No required parameter N/A N/A Whether to show in reverse date order (affects default search order only) (null: read config)
$highlight_by_member ?MEMBER No No required parameter N/A N/A Member to highlight the posts of (null: none)
$allow_reviews boolean No No required parameter N/A N/A Whether to allow ratings along with the comment (like reviews)
$num_to_show_limit ?integer No No required parameter N/A N/A Maximum to load (null: default)
$hidden ?Tempcode No No Null N/A N/A Hidden form fields for commenting form (null: none)

Returns

  • The Tempcode for the comment topic
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Render a comment topic.
 *
 * @param  ID_TEXT $content_type Content type to show topic for
 * @param  ID_TEXT $content_id Content ID of content type to show topic for
 * @param  boolean $invisible_if_no_comments Whether the comment box will be invisible if there are not yet any comments (and you're not staff)
 * @param  ?string $forum_name The name of the forum to use (null: default comment forum)
 * @param  ?string $post_warning The default post to use (null: standard courtesy warning)
 * @param  ?mixed $preloaded_comments The raw comment array (null: lookup). This is useful if we want to pass it through a filter
 * @param  ?boolean $reverse Whether to show in reverse date order (affects default search order only) (null: read config)
 * @param  ?MEMBER $highlight_by_member Member to highlight the posts of (null: none)
 * @param  boolean $allow_reviews Whether to allow ratings along with the comment (like reviews)
 * @param  ?integer $num_to_show_limit Maximum to load (null: default)
 * @param  ?Tempcode $hidden Hidden form fields for commenting form (null: none)
 * @return Tempcode The Tempcode for the comment topic
 */

public function render_as_comment_topic(string $content_type, string $content_id, bool $invisible_if_no_comments, ?string $forum_name, ?string $post_warning, $preloaded_comments, ?bool $reverse, ?int $highlight_by_member, bool $allow_reviews, ?int $num_to_show_limit, ?object $hidden = null) : object