Inherits MediaWiki\Context\ContextSource.
|
| | __construct ( $context, $linkRenderer=null, $flags=0) |
| |
| | beginLogEventsList () |
| |
| | endLogEventsList () |
| |
| | logLine ( $row) |
| |
| | showOptions ( $type='', $year=0, $month=0, $day=0, $username='') |
| | Show options for the log list.
|
| |
| | canUseWikiPage () |
| | Check whether a WikiPage object can be get with getWikiPage().
|
| |
| | exportSession () |
| | Export the resolved user IP, HTTP headers, user ID, and session ID.
|
| |
| | getActionName () |
| | Get the action name for the current web request.
|
| |
| | getAuthority () |
| |
| | getConfig () |
| |
| | getContext () |
| | Get the base IContextSource object.
|
| |
| | getCsrfTokenSet () |
| | Get a repository to obtain and match CSRF tokens.
|
| |
| | getLanguage () |
| |
| | getLanguageCode () |
| |
| | getOutput () |
| |
| | getRequest () |
| |
| | getSkin () |
| |
| | getTiming () |
| |
| | getTitle () |
| |
| | getUser () |
| |
| | getWikiPage () |
| | Get the WikiPage object.
|
| |
| | msg ( $key,... $params) |
| | Get a Message object with context set Parameters are the same as wfMessage()
|
| |
| | setContext (IContextSource $context) |
| |
|
| static | getBlockLogWarningBox (DatabaseBlockStore $blockStore, NamespaceInfo $namespaceInfo, MessageLocalizer $localizer, LinkRenderer $linkRenderer, $user, ?Title $title, array|callable $additionalParams=[]) |
| |
| static | getExcludeClause ( $db, $audience='public', ?Authority $performer=null) |
| | SQL clause to skip forbidden log types for this user.
|
| |
| static | isDeleted ( $row, $field) |
| |
| static | showLogExtract (&$out, $types=[], $pages='', $user='', $param=[]) |
| | Show log extract.
|
| |
| static | typeAction ( $row, $type, $action) |
| |
| static | userCan ( $row, $field, Authority $performer) |
| | Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted and/or restricted log type.
|
| |
| static | userCanBitfield ( $bitfield, $field, Authority $performer) |
| | Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.
|
| |
| static | userCanViewLogType ( $type, Authority $performer) |
| | Determine if the current user is allowed to view a particular field of this log row, if it's marked as restricted log type.
|
| |
Definition at line 52 of file LogEventsList.php.
◆ __construct()
| MediaWiki\Logging\LogEventsList::__construct |
( |
| $context, |
|
|
| $linkRenderer = null, |
|
|
| $flags = 0 ) |
◆ beginLogEventsList()
| MediaWiki\Logging\LogEventsList::beginLogEventsList |
( |
| ) |
|
◆ endLogEventsList()
| MediaWiki\Logging\LogEventsList::endLogEventsList |
( |
| ) |
|
◆ getBlockLogWarningBox()
- Access: internal
- – shared code for IntroMessageBuilder, Article::showMissingArticle, and ContributionsSpecialPage::contributionsSub
If the user associated with the current page is blocked, get a warning box with a block log extract in it. Otherwise, return null.
- Parameters
-
| DatabaseBlockStore | $blockStore | |
| NamespaceInfo | $namespaceInfo | |
| MessageLocalizer | $localizer | |
| LinkRenderer | $linkRenderer | |
| UserIdentity | false | null | $user | The user identity that may be blocked |
| Title | null | $title | The title being viewed. Pass null if the box should be shown regardless of the title. |
| array | callable | $additionalParams | Either:
- An array of extra parameters for LogEventsList::showLogExtract, or
- A callback returning such an array.
|
When a callback is used, it receives a $data array with the following keys:
blocks: DatabaseBlock[] - Active blocks matching the target
sitewide: bool - Whether any of the blocks is sitewide
logTargetPages: string[] - Pages used as log targets - Returns
- string|null
Definition at line 859 of file LogEventsList.php.
References MediaWiki\Title\NamespaceInfo\getCanonicalName(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), LIST_OR, MediaWiki\Linker\LinkRenderer\makeKnownLink(), MessageLocalizer\msg(), MediaWiki\Block\DatabaseBlockStore\newListFromTarget(), NS_USER, and MediaWiki\Logging\LogEventsList\showLogExtract().
◆ getExcludeClause()
| static MediaWiki\Logging\LogEventsList::getExcludeClause |
( |
| $db, |
|
|
| $audience = 'public', |
|
|
?Authority | $performer = null ) |
|
static |
◆ getLinkRenderer()
| MediaWiki\Logging\LogEventsList::getLinkRenderer |
( |
| ) |
|
|
protected |
◆ isDeleted()
| static MediaWiki\Logging\LogEventsList::isDeleted |
( |
| $row, |
|
|
| $field ) |
|
static |
- Parameters
-
| stdClass | $row | |
| int | $field | One of LogPage::DELETED_ACTION, ::DELETED_COMMENT, ::DELETED_USER, ::DELETED_RESTRICTED |
- Returns
- bool
Definition at line 562 of file LogEventsList.php.
◆ logLine()
| MediaWiki\Logging\LogEventsList::logLine |
( |
| $row | ) |
|
◆ showLogExtract()
| static MediaWiki\Logging\LogEventsList::showLogExtract |
( |
& | $out, |
|
|
| $types = [], |
|
|
| $pages = '', |
|
|
| $user = '', |
|
|
| $param = [] ) |
|
static |
Show log extract.
Either with text and a box (set $msgKey) or without (don't set $msgKey)
- Parameters
-
| OutputPage | string | &$out | |
| string | array | $types | Log types to show |
| string|PageReference|(string|PageReference)[] | $pages The page title(s) to show log entries for |
| string | $user | The user who made the log entries |
| array | $param | Associative Array with the following additional options:
- lim Integer Limit of items to show, default is 50
- conds Array Extra conditions for the query (e.g. $dbr->expr( 'log_action', '!=', 'revision' ))
- showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
- msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wfMessage
- offset Set to overwrite offset parameter in WebRequest set to '' to unset offset
- wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
- flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
- useRequestParams boolean Set true to use Pager-related parameters in the WebRequest
- useMaster boolean Use primary DB
- extraUrlParams array|bool Additional url parameters for "full log" link (if it is shown)
- footerHtmlItems: string[] Extra HTML to add as horizontal list items after the end of the log
|
- Returns
- int Number of total log items (not limited by $lim)
Definition at line 594 of file LogEventsList.php.
References MediaWiki\Logging\LogEventsList\$flags, MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\HookContainer\HookRunner\onLogEventsListShowLogExtract().
Referenced by MediaWiki\Logging\LogEventsList\getBlockLogWarningBox().
◆ showOptions()
| MediaWiki\Logging\LogEventsList::showOptions |
( |
| $type = '', |
|
|
| $year = 0, |
|
|
| $month = 0, |
|
|
| $day = 0, |
|
|
| $username = '' ) |
◆ typeAction()
| static MediaWiki\Logging\LogEventsList::typeAction |
( |
| $row, |
|
|
| $type, |
|
|
| $action ) |
|
static |
- Parameters
-
| stdClass | $row | |
| string | array | $type | |
| string | array | $action | |
- Returns
- bool
Definition at line 496 of file LogEventsList.php.
◆ userCan()
| static MediaWiki\Logging\LogEventsList::userCan |
( |
| $row, |
|
|
| $field, |
|
|
Authority | $performer ) |
|
static |
◆ userCanBitfield()
| static MediaWiki\Logging\LogEventsList::userCanBitfield |
( |
| $bitfield, |
|
|
| $field, |
|
|
Authority | $performer ) |
|
static |
◆ userCanViewLogType()
| static MediaWiki\Logging\LogEventsList::userCanViewLogType |
( |
| $type, |
|
|
Authority | $performer ) |
|
static |
◆ $flags
| int MediaWiki\Logging\LogEventsList::$flags |
◆ $showTagEditUI
| bool MediaWiki\Logging\LogEventsList::$showTagEditUI |
|
protected |
◆ NO_ACTION_LINK
| const MediaWiki\Logging\LogEventsList::NO_ACTION_LINK = 1 |
◆ NO_EXTRA_USER_LINKS
| const MediaWiki\Logging\LogEventsList::NO_EXTRA_USER_LINKS = 2 |
◆ USE_CHECKBOXES
| const MediaWiki\Logging\LogEventsList::USE_CHECKBOXES = 4 |
The documentation for this class was generated from the following file: