Page MenuHomeWickedGov Phorge

ConditionalDefaultOptionsAddConditionHook.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ConditionalDefaultOptionsAddConditionHook.php

<?php
namespace MediaWiki\User\Options\Hook;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "ConditionalDefaultOptionsAddCondition" to register handlers implementing
* this interface. It runs virtually on any request, although it should run once, performance of
* the hook run should be taken in account.
*
* @stable to implement
* @ingroup Hooks
*/
interface ConditionalDefaultOptionsAddConditionHook {
/**
* This hook is called when ConditionalDefaultsLookup service is created.
* Important: $extraConditions must be added and used in a property defined by the same extension. Using
* a condition from a missing extension will result in fatal error.
* See also Manual:$wgConditionalUserOptions.
*
* @since 1.43
*
* @param array<string,callable> &$extraConditions An empty array to add checker functions to
* evaluate conditions set in $wgConditionalUserOptions. The key is the name of the condition
* and the value a callable which will take two arguments:
* - UserIdentity $user: the user which option is being evaluated
* - array $args: the rest of arguments in the relevant condition configuration
* @return void This hook must not abort, it must return no value
*/
public function onConditionalDefaultOptionsAddCondition( array &$extraConditions ): void;
}

File Metadata

Mime Type
text/x-php
Expires
Oct 5 2026, 05:20 (6 w, 10 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b9/22/f24a8118be3a6ed05cd65bb90b16
Default Alt Text
ConditionalDefaultOptionsAddConditionHook.php (1 KB)

Event Timeline