@@ 655-664 (lines=10) @@ | ||
652 | * @param mixed $value [optional] Value of the configuration variable. |
|
653 | * @since 1.23 |
|
654 | */ |
|
655 | public function addJsConfigVars( $keys, $value = null ) { |
|
656 | if ( is_array( $keys ) ) { |
|
657 | foreach ( $keys as $key => $value ) { |
|
658 | $this->mJsConfigVars[$key] = $value; |
|
659 | } |
|
660 | return; |
|
661 | } |
|
662 | ||
663 | $this->mJsConfigVars[$keys] = $value; |
|
664 | } |
|
665 | ||
666 | /** |
|
667 | * Copy items from the OutputPage object into this one |
@@ 2994-3003 (lines=10) @@ | ||
2991 | * @param string|array $keys Key or array of key/value pairs |
|
2992 | * @param mixed $value [optional] Value of the configuration variable |
|
2993 | */ |
|
2994 | public function addJsConfigVars( $keys, $value = null ) { |
|
2995 | if ( is_array( $keys ) ) { |
|
2996 | foreach ( $keys as $key => $value ) { |
|
2997 | $this->mJsConfigVars[$key] = $value; |
|
2998 | } |
|
2999 | return; |
|
3000 | } |
|
3001 | ||
3002 | $this->mJsConfigVars[$keys] = $value; |
|
3003 | } |
|
3004 | ||
3005 | /** |
|
3006 | * Get an array containing the variables to be set in mw.config in JavaScript. |