MediaWiki  1.33.0
Go to the documentation of this file.
1 <?php
4  protected function getMessageParameters() {
5  $lang = $this->context->getLanguage();
6  $params = parent::getMessageParameters();
9  return $params;
10  }
12  public function getActionLinks() {
13  if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
14  || $this->entry->getSubtype() !== 'change'
15  || !$this->context->getUser()->isAllowed( 'editcontentmodel' )
16  ) {
17  return '';
18  }
20  $params = $this->extractParameters();
21  $revert = $this->getLinkRenderer()->makeKnownLink(
22  SpecialPage::getTitleFor( 'ChangeContentModel' ),
23  $this->msg( 'logentry-contentmodel-change-revertlink' )->text(),
24  [],
25  [
26  'pagetitle' => $this->entry->getTarget()->getPrefixedText(),
27  'model' => $params[3],
28  'reason' => $this->msg( 'logentry-contentmodel-change-revert' )->inContentLanguage()->text(),
29  ]
30  );
32  return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
33  }
34 }
if(!isset( $args[0])) $lang
Definition: testCompression.php:33
Definition: styleTest.css.php:44
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
Definition: SpecialPage.php:82
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
Formats parameters intented for action message from array of all parameters.
Definition: ContentModelLogFormatter.php:4
msg( $key)
Shortcut for wfMessage which honors local context.
Definition: LogFormatter.php:740
Returns extra links that comes after the action text, like "revert", etc.
Definition: ContentModelLogFormatter.php:12
Definition: LogPage.php:34
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException' returning false will NOT prevent logging a wrapping ErrorException create2 Corresponds to logging log_action database field and which is displayed in the UI & $revert
Definition: hooks.txt:2162
static getLocalizedName( $name, Language $lang=null)
Returns the localized name for a given content model.
Definition: ContentHandler.php:314
Definition: ContentModelLogFormatter.php:3
Implements the default log formatting.
Definition: LogFormatter.php:38
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
Definition: All_system_messages.txt:1267
Definition: LogFormatter.php:136
Extracts the optional extra parameters for use in action messages.
Definition: LogFormatter.php:498