Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
TranslateMetadata Class Reference

Static Public Member Functions

static preloadGroups (array $groups, string $caller)
 
static get ( $group, $key)
 Get a metadata value for the given group and key.
 
static getWithDefaultValue (string $group, string $key, string $defaultValue)
 Get a metadata value for the given group and key.
 
static set ( $group, $key, $value)
 Set a metadata value for the given group and metadata key.
 
static getSubgroups (string $groupId)
 Wrapper for getting subgroups.
 
static setSubgroups ( $groupId, $subgroupIds)
 Wrapper for setting subgroups.
 
static deleteGroup ( $groupId)
 Wrapper for deleting one wiki aggregate group at once.
 
static isExcluded (string $groupId, string $code)
 
static loadBasicMetadataForTranslatablePages (array $groupIds, array $keys)
 Do a query optimized for page list in Special:PageTranslation.
 
static moveMetadata (string $oldGroupId, string $newGroupId, array $metadataKeysToMove)
 
static clearMetadata (string $groupId, array $metadataKeys)
 

Detailed Description

Definition at line 13 of file TranslateMetadata.php.

Member Function Documentation

◆ clearMetadata()

static TranslateMetadata::clearMetadata ( string $groupId,
array $metadataKeys )
static
Parameters
string$groupId
string[]$metadataKeys
Returns
void

Definition at line 245 of file TranslateMetadata.php.

◆ deleteGroup()

static TranslateMetadata::deleteGroup ( $groupId)
static

Wrapper for deleting one wiki aggregate group at once.

Parameters
string$groupId
Since
2012-05-09

Definition at line 143 of file TranslateMetadata.php.

◆ get()

static TranslateMetadata::get ( $group,
$key )
static

Get a metadata value for the given group and key.

Parameters
string$groupThe group name
string$keyMetadata key
Returns
string|bool

Definition at line 52 of file TranslateMetadata.php.

◆ getSubgroups()

static TranslateMetadata::getSubgroups ( string $groupId)
static

Wrapper for getting subgroups.

Parameters
string$groupId
Returns
string[]|null
Since
2012-05-09

Definition at line 106 of file TranslateMetadata.php.

◆ getWithDefaultValue()

static TranslateMetadata::getWithDefaultValue ( string $group,
string $key,
string $defaultValue )
static

Get a metadata value for the given group and key.

If it does not exist, return the default value.

Parameters
string$group
string$key
string$defaultValue
Returns
string

Definition at line 66 of file TranslateMetadata.php.

◆ isExcluded()

static TranslateMetadata::isExcluded ( string $groupId,
string $code )
static

Definition at line 151 of file TranslateMetadata.php.

◆ loadBasicMetadataForTranslatablePages()

static TranslateMetadata::loadBasicMetadataForTranslatablePages ( array $groupIds,
array $keys )
static

Do a query optimized for page list in Special:PageTranslation.

Parameters
string[]$groupIds
string[]$keysWhich metadata keys to load
Returns
array<string,array<string,string>>

Definition at line 199 of file TranslateMetadata.php.

◆ moveMetadata()

static TranslateMetadata::moveMetadata ( string $oldGroupId,
string $newGroupId,
array $metadataKeysToMove )
static
Parameters
string$oldGroupId
string$newGroupId
string[]$metadataKeysToMove
Returns
void

Definition at line 225 of file TranslateMetadata.php.

◆ preloadGroups()

static TranslateMetadata::preloadGroups ( array $groups,
string $caller )
static
Parameters
string[]$groupsList of translate groups
string$caller

Definition at line 23 of file TranslateMetadata.php.

◆ set()

static TranslateMetadata::set ( $group,
$key,
$value )
static

Set a metadata value for the given group and metadata key.

Updates the value if already existing.

Parameters
string$groupThe group id
string$keyMetadata key
string | false$valueMetadata value, false deletes from cache

Definition at line 80 of file TranslateMetadata.php.

◆ setSubgroups()

static TranslateMetadata::setSubgroups ( $groupId,
$subgroupIds )
static

Wrapper for setting subgroups.

Parameters
string$groupId
array$subgroupIds
Since
2012-05-09

Definition at line 133 of file TranslateMetadata.php.


The documentation for this class was generated from the following file: