Posts
in package
implements
ActionInterface
uses
ActionTrait
This class contains all the administration settings for topics and posts.
Table of Contents
Interfaces
- ActionInterface
- Interface for all action classes.
Properties
- $subaction : string
- $subactions : 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.
- censor() : void
- Shows an interface to set and test censored words.
- draftConfigVars() : array<string|int, mixed>
- Gets configuration variables for the drafts sub-action.
- drafts() : void
- Modify any setting related to drafts.
- 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.
- load() : static
- Static wrapper for constructor.
- postConfigVars() : array<string|int, mixed>
- Gets configuration variables for the posts sub-action.
- posts() : void
- Modify any setting related to posts and posting.
- topicConfigVars() : array<string|int, mixed>
- Gets configuration variables for the topics sub-action.
- topics() : void
- Modify any setting related to topics.
- __construct() : mixed
- Constructor. Protected to force instantiation via self::load().
Properties
$subaction
public
string
$subaction
= 'posts'
The requested sub-action. This should be set by the constructor.
$subactions
public
static array<string|int, mixed>
$subactions
= ['posts' => 'posts', 'censor' => 'censor', 'topics' => 'topics', 'drafts' => 'drafts']
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
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
boolcanShowDebuggingInfo()
Determines whether debugging info should be shown.
public
canShowDebuggingInfo() : bool
Return values
boolcanShowInMaintenanceMode()
Determines whether this action allows access in maintenance mode.
public
canShowInMaintenanceMode() : bool
Return values
bool —True if access is allowed, false otherwise.
censor()
Shows an interface to set and test censored words.
public
censor() : void
It uses the censor_vulgar, censor_proper, censorWholeWord, and censorIgnoreCase settings. Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=censor.
Tags
draftConfigVars()
Gets configuration variables for the drafts sub-action.
public
static draftConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed> —$config_vars for the sub-action.
drafts()
Modify any setting related to drafts.
public
drafts() : void
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=drafts
execute()
Dispatcher to whichever sub-action method is necessary.
public
execute() : void
getOutputType()
Gets the output type for this action.
public
getOutputType() : OutputTypeInterface
Return values
OutputTypeInterfaceisAgreementAction()
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
public
isAgreementAction() : bool
Return values
boolisRestrictedGuestAccessAllowed()
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
boolload()
Static wrapper for constructor.
public
static load() : static
Return values
static —An instance of this class.
postConfigVars()
Gets configuration variables for the posts sub-action.
public
static postConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed> —$config_vars for the sub-action.
posts()
Modify any setting related to posts and posting.
public
posts() : void
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=posts.
topicConfigVars()
Gets configuration variables for the topics sub-action.
public
static topicConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed> —$config_vars for the sub-action.
topics()
Modify any setting related to topics.
public
topics() : void
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=topics.
__construct()
Constructor. Protected to force instantiation via self::load().
protected
__construct() : mixed