Offers functionality for reading and updating Translate group related metadata. More...
Public Member Functions | |
__construct (IConnectionProvider $dbProvider) | |
preloadGroups (array $groups, string $caller) | |
get (string $group, string $key) | |
Get a metadata value for the given group and key. | |
getWithDefaultValue (string $group, string $key, ?string $defaultValue) | |
Get a metadata value for the given group and key. | |
set (string $groupId, string $key, $value) | |
Set a metadata value for the given group and metadata key. | |
getSubgroups (string $groupId) | |
Wrapper for getting subgroups. | |
setSubgroups (string $groupId, array $subgroupIds) | |
Wrapper for setting subgroups. | |
deleteGroup (string $groupId) | |
Wrapper for deleting one wiki aggregate group at once. | |
isExcluded (string $groupId, string $code) | |
loadBasicMetadataForTranslatablePages (array $groupIds, array $keys) | |
Do a query optimized for page list in Special:PageTranslation. | |
moveMetadata (string $oldGroupId, string $newGroupId, array $metadataKeysToMove) | |
clearMetadata (string $groupId, array $metadataKeys) | |
getGroupsWithSubgroups () | |
Get groups ids that have subgroups set up. | |
Offers functionality for reading and updating Translate group related metadata.
Definition at line 19 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::__construct | ( | IConnectionProvider | $dbProvider | ) |
Definition at line 27 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::clearMetadata | ( | string | $groupId, |
array | $metadataKeys ) |
string | $groupId | |
string[] | $metadataKeys |
Definition at line 248 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::deleteGroup | ( | string | $groupId | ) |
Wrapper for deleting one wiki aggregate group at once.
Definition at line 142 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::get | ( | string | $group, |
string | $key ) |
Get a metadata value for the given group and key.
string | $group | The group name |
string | $key | Metadata key |
Definition at line 64 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::getGroupsWithSubgroups | ( | ) |
Get groups ids that have subgroups set up.
Definition at line 256 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::getSubgroups | ( | string | $groupId | ) |
Wrapper for getting subgroups.
Definition at line 114 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::getWithDefaultValue | ( | string | $group, |
string | $key, | ||
?string | $defaultValue ) |
Get a metadata value for the given group and key.
If it does not exist, return the default value.
Definition at line 73 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::isExcluded | ( | string | $groupId, |
string | $code ) |
Definition at line 155 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::loadBasicMetadataForTranslatablePages | ( | array | $groupIds, |
array | $keys ) |
Do a query optimized for page list in Special:PageTranslation.
string[] | $groupIds | |
string[] | $keys | Which metadata keys to load |
Definition at line 200 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::moveMetadata | ( | string | $oldGroupId, |
string | $newGroupId, | ||
array | $metadataKeysToMove ) |
Definition at line 229 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::preloadGroups | ( | array | $groups, |
string | $caller ) |
Definition at line 31 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::set | ( | string | $groupId, |
string | $key, | ||
$value ) |
Set a metadata value for the given group and metadata key.
Updates the value if already existing.
string | $groupId | The group id |
string | $key | Metadata key |
string | false | $value | Metadata value, false deletes from cache |
Definition at line 85 of file MessageGroupMetadata.php.
MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata::setSubgroups | ( | string | $groupId, |
array | $subgroupIds ) |
Wrapper for setting subgroups.
Definition at line 136 of file MessageGroupMetadata.php.