Function Module_topics->redirect_to

Definitions

forum/pages/modules/topics.php

  • Do a redirection page to a certain topic/post (because we've just done an action and want to go back).
  • 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 ID_TEXT No No required parameter N/A N/A The language string codename for the title to use in the page
$topic_id AUTO_LINK No No required parameter N/A N/A The ID of the topic to redirect to
$lang ?mixed No No Null N/A N/A What to output (string or Tempcode) (null: default)
$post_id ?AUTO_LINK No No Null N/A N/A The ID of the post to redirect to (null: redirect to topic instead)

Returns

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

Preview

Code (PHP)

/**
 * Do a redirection page to a certain topic/post (because we've just done an action and want to go back).
 *
 * @param  ID_TEXT $_title The language string codename for the title to use in the page
 * @param  AUTO_LINK $topic_id The ID of the topic to redirect to
 * @param  ?mixed $lang What to output (string or Tempcode) (null: default)
 * @param  ?AUTO_LINK $post_id The ID of the post to redirect to (null: redirect to topic instead)
 * @return Tempcode The UI
 */

public function redirect_to(string $_title, int $topic_id, $lang = null, ?int $post_id = null) : object