class helper

Class with some helpful functions used in feeds

Properties

protected config $config
protected ContainerInterface $container
protected path_helper $path_helper
protected renderer $renderer
protected user $user
protected auth $auth

Methods

__construct(auth $auth, config $config, ContainerInterface $container, path_helper $path_helper, renderer $renderer, user $user)

Constructor

get_board_url()

Returns the board url (and caches it in the function)

append_sid($url, $params)

Run links through append_sid(), prepend generate_board_url() and remove session id

format_date($time)

Generate ISO 8601 date string (RFC 3339)

string
generate_content(string $content, string $uid, string $bitfield, int $options, int $forum_id, array $post_attachments)

Generate text content

Details

at line 56
__construct(auth $auth, config $config, ContainerInterface $container, path_helper $path_helper, renderer $renderer, user $user)

Constructor

Parameters

auth $auth

Auth object

config $config

Config object

ContainerInterface $container

Service container object

path_helper $path_helper

Path helper object

renderer $renderer

TextFormatter renderer object

user $user

User object

at line 69
get_board_url()

Returns the board url (and caches it in the function)

at line 84
append_sid($url, $params)

Run links through append_sid(), prepend generate_board_url() and remove session id

Parameters

$url
$params

at line 92
format_date($time)

Generate ISO 8601 date string (RFC 3339)

Parameters

$time

at line 117
string generate_content(string $content, string $uid, string $bitfield, int $options, int $forum_id, array $post_attachments)

Generate text content

Parameters

string $content

is feed text content

string $uid

is bbcode_uid

string $bitfield

is bbcode bitfield

int $options

bbcode flag options

int $forum_id

is the forum id

array $post_attachments

is an array containing the attachments and their respective info

Return Value

string

the html content to be printed for the feed