MinervaNeue
A responsive mobile first skin
|
A wrapper for all available Minerva permissions. More...
Public Member Functions | |
__construct (SkinOptions $skinOptions, LanguagesHelper $languagesHelper, PermissionManager $permissionManager, IContentHandlerFactory $contentHandlerFactory, UserFactory $userFactory, WatchlistManager $watchlistManager) | |
Initialize internal Minerva Permissions system. | |
setContext (IContextSource $context) | |
isAllowed ( $action) | |
Gets whether or not the action is allowed. | |
isTalkAllowed () | |
@inheritDoc | |
Protected Member Functions | |
isCurrentPageContentModelEditable () | |
Checks whether the editor can handle the existing content handler type. | |
Additional Inherited Members | |
Public Attributes inherited from MediaWiki\Minerva\Permissions\IMinervaPagePermissions | |
const | WATCHABLE = 'watchable' |
const | WATCH = 'watch' |
const | SWITCH_LANGUAGE = 'switch-language' |
const | CONTENT_EDIT = 'edit' |
Given user permission, the page content is editable. | |
const | EDIT_OR_CREATE = 'edit-or-create' |
The existing page is editable or nonexisting page is creatable by the active user. | |
const | TALK = 'talk' |
const | HISTORY = 'history' |
const | MOVE = 'move' |
const | DELETE = 'delete' |
const | PROTECT = 'protect' |
A wrapper for all available Minerva permissions.
MediaWiki\Minerva\Permissions\MinervaPagePermissions::__construct | ( | SkinOptions | $skinOptions, |
LanguagesHelper | $languagesHelper, | ||
PermissionManager | $permissionManager, | ||
IContentHandlerFactory | $contentHandlerFactory, | ||
UserFactory | $userFactory, | ||
WatchlistManager | $watchlistManager ) |
Initialize internal Minerva Permissions system.
SkinOptions | $skinOptions | |
LanguagesHelper | $languagesHelper | |
PermissionManager | $permissionManager | |
IContentHandlerFactory | $contentHandlerFactory | |
UserFactory | $userFactory | |
WatchlistManager | $watchlistManager |
MediaWiki\Minerva\Permissions\MinervaPagePermissions::isAllowed | ( | $action | ) |
Gets whether or not the action is allowed.
Actions isn't allowed when:
The "edit" action is not allowed if editing is not possible on the page
The "switch-language" is allowed if there are interlanguage links on the page, or $wgMinervaAlwaysShowLanguageButton
is truthy.
@inheritDoc
ConfigException |
Implements MediaWiki\Minerva\Permissions\IMinervaPagePermissions.
|
protected |
Checks whether the editor can handle the existing content handler type.
MediaWiki\Minerva\Permissions\MinervaPagePermissions::isTalkAllowed | ( | ) |
@inheritDoc
Implements MediaWiki\Minerva\Permissions\IMinervaPagePermissions.
MediaWiki\Minerva\Permissions\MinervaPagePermissions::setContext | ( | IContextSource | $context | ) |
IContextSource | $context |