Utility class for the sandbox feature of Translate.
More...
|
static | addUser ( $name, $email, $password) |
| Adds a new user without doing much validation.
|
|
static | deleteUser (User $user, $force='') |
| Deletes a sandboxed user without doing much validation.
|
|
static | getUsers () |
| Get all sandboxed users.
|
|
static | promoteUser (User $user) |
| Removes the user from the sandbox.
|
|
static | sendEmail (User $sender, User $target, $type) |
| Sends a reminder to the user.
|
|
static | isSandboxed (User $user) |
| Shortcut for checking if given user is in the sandbox.
|
|
static | enforcePermissions (User $user, array &$rights) |
| Hook: UserGetRights.
|
|
static | onGetPreferences ( $user, &$preferences) |
| Hook: onGetPreferences.
|
|
static | onApiCheckCanExecute (ApiBase $module, User $user, &$message) |
| Inclusion listing for certain API modules.
|
|
Utility class for the sandbox feature of Translate.
Do not try this yourself. This code makes a lot of assumptions about what happens to the user account.
Definition at line 23 of file TranslateSandbox.php.
◆ addUser()
static TranslateSandbox::addUser |
( |
| $name, |
|
|
| $email, |
|
|
| $password ) |
|
static |
Adds a new user without doing much validation.
- Parameters
-
string | $name | User name. |
string | $email | Email address. |
string | $password | User provided password. |
- Returns
- User
- Exceptions
-
Definition at line 33 of file TranslateSandbox.php.
◆ deleteUser()
static TranslateSandbox::deleteUser |
( |
User | $user, |
|
|
| $force = '' ) |
|
static |
Deletes a sandboxed user without doing much validation.
- Parameters
-
User | $user | |
string | $force | If set to 'force' will skip the little validation we have. |
- Exceptions
-
Definition at line 95 of file TranslateSandbox.php.
◆ enforcePermissions()
static TranslateSandbox::enforcePermissions |
( |
User | $user, |
|
|
array & | $rights ) |
|
static |
◆ getUsers()
static TranslateSandbox::getUsers |
( |
| ) |
|
|
static |
◆ isSandboxed()
static TranslateSandbox::isSandboxed |
( |
User | $user | ) |
|
|
static |
Shortcut for checking if given user is in the sandbox.
- Parameters
-
- Returns
- bool
- Since
- 2013.06
Definition at line 253 of file TranslateSandbox.php.
◆ onApiCheckCanExecute()
static TranslateSandbox::onApiCheckCanExecute |
( |
ApiBase | $module, |
|
|
User | $user, |
|
|
& | $message ) |
|
static |
Inclusion listing for certain API modules.
See also enforcePermissions. Hook: ApiCheckCanExecute
- Parameters
-
ApiBase | $module | |
User | $user | |
string | &$message | |
- Returns
- bool
Definition at line 306 of file TranslateSandbox.php.
◆ onGetPreferences()
static TranslateSandbox::onGetPreferences |
( |
| $user, |
|
|
& | $preferences ) |
|
static |
◆ promoteUser()
static TranslateSandbox::promoteUser |
( |
User | $user | ) |
|
|
static |
◆ sendEmail()
static TranslateSandbox::sendEmail |
( |
User | $sender, |
|
|
User | $target, |
|
|
| $type ) |
|
static |
Sends a reminder to the user.
- Parameters
-
User | $sender | |
User | $target | |
string | $type | 'reminder' or 'promotion' |
- Exceptions
-
- Since
- 2013.12
Definition at line 183 of file TranslateSandbox.php.
The documentation for this class was generated from the following file: