Documentation

ShowPosts
in package
implements ActionInterface uses ActionTrait, BackwardCompatibility

Rename here and in the exportStatic call at the end of the file.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

$subaction  : string
$subactions  : array<string|int, mixed>
$obj  : static

Methods

attachments()  : void
Show all the attachments belonging to this member.
call()  : void
Convenience method to load() and execute() an instance of this class.
canBeLogged()  : bool
Determines whether this action can be logged in the online log.
canShowDebuggingInfo()  : bool
Determines whether debugging info should be shown.
canShowInMaintenanceMode()  : bool
Determines whether this action allows access in maintenance mode.
execute()  : void
Dispatcher to whichever sub-action method is necessary.
getOutputType()  : OutputTypeInterface
Gets the output type for this action.
isAgreementAction()  : bool
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
isRestrictedGuestAccessAllowed()  : bool
Determines whether this action allows access if guest access is restricted.
isSimpleAction()  : bool
Determines whether this is a simple action.
list_getAttachments()  : array<string|int, mixed>
Get a list of attachments for a member. Callback for the list in showAttachments()
list_getNumAttachments()  : int
Gets the total number of attachments for a member
list_getNumUnwatched()  : int
Count the number of topics in the unwatched list
list_getUnwatched()  : array<string|int, mixed>
Gets information about unwatched (disregarded) topics. Callback for the list in show_unwatched
load()  : static
Static wrapper for constructor.
messages()  : void
Show all the posts by this member.
subActionProvider()  : void
Backwards compatibility function for handling profile-related subactions
topics()  : void
Show all the topics started by this member.
unwatched()  : void
Show all the unwatched topics for this member.
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
deletePost()  : void
Deletes a message and then redirects back to the list.
loadPosts()  : void
Loads a user's posts or topics
setPageTitle()  : void
Constructor. Protected to force instantiation via self::load().

Properties

$subaction

public string $subaction = 'messages'

The requested sub-action. This should be set by the constructor.

$subactions

public static array<string|int, mixed> $subactions = ['messages' => 'messages', 'topics' => 'topics', 'unwatchedtopics' => 'unwatched', 'attach' => 'attachments']

Available sub-actions.

$obj

protected static static $obj

An instance of this class. This is used by the load() method to prevent multiple instantiations.

Methods

attachments()

Show all the attachments belonging to this member.

public attachments() : void

call()

Convenience method to load() and execute() an instance of this class.

public static call() : void

canBeLogged()

Determines whether this action can be logged in the online log.

public canBeLogged() : bool
Return values
bool

canShowDebuggingInfo()

Determines whether debugging info should be shown.

public canShowDebuggingInfo() : bool
Return values
bool

canShowInMaintenanceMode()

Determines whether this action allows access in maintenance mode.

public canShowInMaintenanceMode() : bool
Return values
bool

True if access is allowed, false otherwise.

execute()

Dispatcher to whichever sub-action method is necessary.

public execute() : void

isAgreementAction()

Determines whether this action can be accessed without accepting the registration agreement and privacy policy.

public isAgreementAction() : bool
Return values
bool

isRestrictedGuestAccessAllowed()

Determines whether this action allows access if guest access is restricted.

public isRestrictedGuestAccessAllowed() : bool
Return values
bool

True if access is allowed, false otherwise.

isSimpleAction()

Determines whether this is a simple action.

public isSimpleAction() : bool
Return values
bool

list_getAttachments()

Get a list of attachments for a member. Callback for the list in showAttachments()

public static list_getAttachments(int $start, int $items_per_page, string $sort, array<string|int, mixed> $boards_allowed) : array<string|int, mixed>
Parameters
$start : int

Which item to start with (for pagination purposes)

$items_per_page : int

How many items to show on each page

$sort : string

A string indicating how to sort the results

$boards_allowed : array<string|int, mixed>

An array containing the IDs of the boards they can see

Return values
array<string|int, mixed>

An array of information about the attachments

list_getNumAttachments()

Gets the total number of attachments for a member

public static list_getNumAttachments(array<string|int, mixed> $boards_allowed) : int
Parameters
$boards_allowed : array<string|int, mixed>

An array of the IDs of the boards they can see

Return values
int

The number of attachments

list_getNumUnwatched()

Count the number of topics in the unwatched list

public static list_getNumUnwatched() : int
Return values
int

The number of unwatched topics

list_getUnwatched()

Gets information about unwatched (disregarded) topics. Callback for the list in show_unwatched

public static list_getUnwatched(int $start, int $items_per_page, string $sort) : array<string|int, mixed>
Parameters
$start : int

The item to start with (for pagination purposes)

$items_per_page : int

How many items to show on each page

$sort : string

A string indicating how to sort the results

Return values
array<string|int, mixed>

An array of information about the unwatched topics

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

messages()

Show all the posts by this member.

public messages() : void

subActionProvider()

Backwards compatibility function for handling profile-related subactions

public static subActionProvider(int $memID[, null|string $sa = null ][, bool $updateRequest = false ][, bool $loadSelfFirst = true ][, bool $loadProfile = false ][, bool $defaultSettings = false ]) : void
Parameters
$memID : int

The member ID

$sa : null|string = null

The subaction

$updateRequest : bool = false

Whether to update $_REQUEST['u']

$loadSelfFirst : bool = true

Whether to load the current user's profile first

$loadProfile : bool = false

Whether to load the profile of the specified member

$defaultSettings : bool = false

Not used?

topics()

Show all the topics started by this member.

public topics() : void

unwatched()

Show all the unwatched topics for this member.

public unwatched() : void

__construct()

Constructor. Protected to force instantiation via self::load().

protected __construct() : mixed

deletePost()

Deletes a message and then redirects back to the list.

protected deletePost() : void

loadPosts()

Loads a user's posts or topics

protected loadPosts([bool $is_topics = false ]) : void
Parameters
$is_topics : bool = false

Whether to load topics instead of posts

setPageTitle()

Constructor. Protected to force instantiation via self::load().

protected setPageTitle() : void

        
On this page

Search results