Documentation

Posts
in package
implements ActionInterface uses ActionTrait, BackwardCompatibility

Handles things related to post moderation.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

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

Methods

approve()  : void
Approve a post, just the one.
approveAllData()  : void
This is a helper function - basically approve everything!
attachments()  : void
View all unapproved attachments.
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_getNumUnapprovedAttachments()  : int
Callback function for UnapprovedAttachments count all the attachments waiting for approval that this approver can approve
list_getUnapprovedAttachments()  : array<string|int, mixed>
Callback function for UnapprovedAttachments retrieve all the attachments waiting for approval the approver can approve
load()  : static
Static wrapper for constructor.
posts()  : void
View all unapproved posts.
subActionProvider()  : null|array<string|int, mixed>
Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
approveMessages()  : void
Approve a batch of posts (or topics in their own right)
removeMessages()  : void
Remove a batch of messages (or topics)

Properties

$subaction

public string $subaction = 'replies'

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

$subactions

public static array<string|int, mixed> $subactions = ['replies' => 'posts', 'topics' => 'posts', 'attachments' => 'attachments', 'approve' => 'approve']

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

approve()

Approve a post, just the one.

public approve() : void

approveAllData()

This is a helper function - basically approve everything!

public static approveAllData() : void

attachments()

View all unapproved attachments.

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_getNumUnapprovedAttachments()

Callback function for UnapprovedAttachments count all the attachments waiting for approval that this approver can approve

public static list_getNumUnapprovedAttachments(string $approve_query) : int
Parameters
$approve_query : string

Additional restrictions based on the boards the approver can see

Return values
int

The number of unapproved attachments

list_getUnapprovedAttachments()

Callback function for UnapprovedAttachments retrieve all the attachments waiting for approval the approver can approve

public static list_getUnapprovedAttachments(int $start, int $items_per_page, string $sort, string $approve_query) : 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

$approve_query : string

Additional restrictions based on the boards the approver can see

Return values
array<string|int, mixed>

An array of information about the unapproved attachments

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

posts()

View all unapproved posts.

public posts() : void

subActionProvider()

Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods

public static subActionProvider([null|string $sa = null ][, bool $return_config = false ][, string|null $activity = null ]) : null|array<string|int, mixed>
Parameters
$sa : null|string = null
$return_config : bool = false
$activity : string|null = null
Return values
null|array<string|int, mixed>

__construct()

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

protected __construct() : mixed

approveMessages()

Approve a batch of posts (or topics in their own right)

protected approveMessages(array<string|int, mixed> $messages, array<string|int, mixed> $messageDetails[, string $current_view = 'replies' ]) : void
Parameters
$messages : array<string|int, mixed>

The IDs of the messages to approve

$messageDetails : array<string|int, mixed>

An array of information about each message, for the log

$current_view : string = 'replies'

What type of unapproved items we're approving - can be 'topics' or 'replies'

removeMessages()

Remove a batch of messages (or topics)

protected removeMessages(array<string|int, mixed> $messages, array<string|int, mixed> $messageDetails[, string $current_view = 'replies' ]) : void
Parameters
$messages : array<string|int, mixed>

The IDs of the messages to remove

$messageDetails : array<string|int, mixed>

An array of information about the messages for the log

$current_view : string = 'replies'

What type of item we're removing - can be 'topics' or 'replies'


        
On this page

Search results