Documentation

IssueWarning
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

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

Methods

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
Does the job.
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_getUserWarningCount()  : int
Get the number of warnings a user has.
list_getUserWarnings()  : array<string|int, mixed>
Get the data about a user's warnings.
load()  : static
Static wrapper for constructor.
subActionProvider()  : void
Backwards compatibility function for handling profile-related subactions
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
preview()  : void
Gets a preview of the warning message.
save()  : void
Saves the newly issued warning.

Properties

$issueErrors

public array<string|int, mixed> $issueErrors = []

This stores any legitimate errors.

$obj

protected static static $obj

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

Methods

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.

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

Simple actions don't require the index template at all.

Return values
bool

list_getUserWarningCount()

Get the number of warnings a user has.

public static list_getUserWarningCount() : int
Return values
int

Total number of warnings for the user.

list_getUserWarnings()

Get the data about a user's warnings.

public static list_getUserWarnings(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 user's warnings

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

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?

__construct()

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

protected __construct() : mixed

preview()

Gets a preview of the warning message.

protected preview() : void

save()

Saves the newly issued warning.

protected save() : void

Also logs the action and, if the relevant setting is enabled, sends a personal message to notify the warned member about it.


        
On this page

Search results