1 | <?php |
||
14 | class Output { |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private static $headItems = array(); |
||
20 | |||
21 | /** |
||
22 | * Add an array of SF_Select field parameters as defined in Page Form's field tag. |
||
23 | * |
||
24 | * This will later be added to $wgOut so that JS can access it via mw.config.get |
||
25 | * |
||
26 | * @param array $data |
||
27 | */ |
||
28 | 1 | public static function addToHeadItem( Array $data = [] ) { |
|
31 | |||
32 | /** |
||
33 | * Commit all SF_Select field parameters to Output |
||
34 | * |
||
35 | */ |
||
36 | public static function commitToParserOutput() { |
||
46 | } |
||
47 |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state