Documentation

Membergroups
in package
implements ActionInterface uses ActionTrait, BackwardCompatibility

This class is concerned with anything in the Manage Membergroups admin screen.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

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

Methods

add()  : void
Handles adding a membergroup and setting some initial properties.
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.
edit()  : void
Editing a membergroup.
execute()  : void
Dispatcher to whichever sub-action method is necessary.
getConfigVars()  : array<string|int, mixed>
Gets the configuration variables for this admin area.
getOutputType()  : OutputTypeInterface
Gets the output type for this action.
index()  : void
Shows an overview of the current membergroups.
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.
settings()  : void
Set some general membergroup settings and permissions.
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().

Properties

$subaction

public string $subaction = 'index'

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

$subactions

public static array<string|int, mixed> $subactions = [ 'index' => ['index', 'manage_membergroups'], 'add' => ['add', 'manage_membergroups'], 'edit' => ['edit', 'manage_membergroups'], 'settings' => ['settings', 'admin_forum'], // This subaction is handled by the Groups action. 'members' => ['SMF\Actions\Groups::call', 'manage_membergroups'], ]

Available sub-actions.

Format: 'sa' => array('method', 'required_permission')

$obj

protected static static $obj

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

Methods

add()

Handles adding a membergroup and setting some initial properties.

public add() : void

Called by ?action=admin;area=membergroups;sa=add. It requires the manage_membergroups permission. Allows to use a predefined permission profile or copy one from another group. Redirects to action=admin;area=membergroups;sa=edit;group=x.

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.

edit()

Editing a membergroup.

public edit() : void

Screen to edit a specific membergroup. Called by ?action=admin;area=membergroups;sa=edit;group=x. It requires the manage_membergroups permission. Also handles the delete button of the edit form. Redirects to ?action=admin;area=membergroups.

execute()

Dispatcher to whichever sub-action method is necessary.

public execute() : void

getConfigVars()

Gets the configuration variables for this admin area.

public static getConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the membergroups area.

index()

Shows an overview of the current membergroups.

public index() : void

Called by ?action=admin;area=membergroups. Requires the manage_membergroups permission. Splits the membergroups in regular ones and post count based groups. It also counts the number of members part of each membergroup.

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

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

settings()

Set some general membergroup settings and permissions.

public settings() : void

Called by ?action=admin;area=membergroups;sa=settings Requires the admin_forum permission (and manage_permissions for changing permissions) Redirects to itself.

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

        
On this page

Search results