[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

/phpbb/controller/ -> helper.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 195 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

helper:: (7 methods):
  __construct()
  render()
  route()
  error()
  message()
  assign_meta_refresh_var()
  get_current_url()


Class: helper  - X-Ref

Controller helper class, contains methods that do things for controllers

__construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\symfony_request $symfony_request, \phpbb\request\request_interface $request, \phpbb\routing\helper $routing_helper)   X-Ref
Constructor

param: \phpbb\template\template $template Template object
param: \phpbb\user $user User object
param: \phpbb\config\config $config Config object
param: \phpbb\symfony_request $symfony_request Symfony Request object
param: \phpbb\request\request_interface $request phpBB request object
param: \phpbb\routing\helper $routing_helper Helper to generate the routes

render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = false)   X-Ref
Automate setting up the page and creating the response object.

return: Response object containing rendered page
param: string $template_file The template handle to render
param: string $page_title The title of the page to output
param: int $status_code The status code to be sent to the page header
param: bool $display_online_list Do we display online users list
param: int $item_id Restrict online users to item id
param: string $item Restrict online users to a certain session item, e.g. forum for session_forum_id
param: bool $send_headers Whether headers should be sent by page_header(). Defaults to false for controllers.

route($route, array $params = array()   X-Ref
Generate a URL to a route

return: string The URL already passed through append_sid()
param: string    $route        Name of the route to travel
param: array    $params        String or array of additional url parameters
param: bool    $is_amp        Is url using & (true) or & (false)
param: string|bool        $session_id    Possibility to use a custom session id instead of the global one
param: bool|string        $reference_type The type of reference to be generated (one of the constants)

error($message, $code = 500)   X-Ref
Output an error, effectively the same thing as trigger_error

return: Response A Response instance
param: string $message The error message
param: int $code The error code (e.g. 404, 500, 503, etc.)

message($message, array $parameters = array()   X-Ref
Output a message

In case of an error, please throw an exception instead

return: Response A Response instance
param: string $message The message to display (must be a language variable)
param: array $parameters The parameters to use with the language var
param: string $title Title for the message (must be a language variable)
param: int $code The HTTP status code (e.g. 404, 500, 503, etc.)

assign_meta_refresh_var($time, $url)   X-Ref
Assigns automatic refresh time meta tag in template

return: null
param: int        $time    time in seconds, when redirection should occur
param: string    $url    the URL where the user should be redirected

get_current_url()   X-Ref
Return the current url

return: string



Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1