Function Module_vforums->_vforum

Definitions

forum/pages/modules/vforums.php

  • The UI to show a virtual forum.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$title Tempcode No No required parameter N/A N/A The title to show for the v-forum
$condition mixed No No required parameter N/A N/A The condition (a fragment of an SQL query that gets embedded in the context of a topic selection query). May be string, or array of strings (separate queries to run and merge; done for performance reasons relating to DB indexing)
$order string No No required parameter N/A N/A The ordering of the results
$separate_pins boolean No No True N/A N/A Whether to show pinning in a separate section
$extra_tpl_map array No No [] N/A N/A Extra template parameters to pass through
$initial_table ?string No No Null N/A N/A The table to query (null: topic table)
$extra_select string No No Blank (empty string) N/A N/A Extra SQL for select clause

Returns

  • The UI
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * The UI to show a virtual forum.
 *
 * @param  Tempcode $title The title to show for the v-forum
 * @param  mixed $condition The condition (a fragment of an SQL query that gets embedded in the context of a topic selection query). May be string, or array of strings (separate queries to run and merge; done for performance reasons relating to DB indexing)
 * @param  string $order The ordering of the results
 * @param  boolean $separate_pins Whether to show pinning in a separate section
 * @param  array $extra_tpl_map Extra template parameters to pass through
 * @param  ?string $initial_table The table to query (null: topic table)
 * @param  string $extra_select Extra SQL for select clause
 * @return Tempcode The UI
 */

public function _vforum(object $title, $condition, string $order, bool $separate_pins = true, array $extra_tpl_map = [], ?string $initial_table = null, string $extra_select = '') : object