77 */
88
99/**
10- * Creates an HTML-Element to warp around the content.
11- *
12- * @param string $code The code where the Element should wrap around
13- * @param int $index The index of the element
14- * @param string $extra Another class to be added to the element.
15- *
16- * @return string The full object.
17- */
18- function createTab (string &$ code , int $ index , string $ extra = 'outer ' ) {
19- return '<div class=" ' .$ extra .' tab-content ' .($ index == 0 ? 'tc-active ' : '' ).'" data-tab=" ' .$ index .'"> ' .$ code .'</div> ' ;
20- }
21-
22- /**
23- * Returns the MultiCodeBlock as a whole.
10+ * Returns the MultiCodeBlock as a whole element.
2411 *
2512 * @param array $lang All of the languages of the different codeblocks.
2613 * @param string $code The codeblocks as a whole.
@@ -55,7 +42,7 @@ function createFrame(array &$lang, string &$code, bool $addCopy = true, string $
5542 * @param Parser $parser The parser object by MediaWiki.
5643 * @param Highlighter $h1 The highlighter object.
5744 *
58- * @return array The codeblock as the first element and the language as the second element .
45+ * @return array Array consisting of the codeblock and the language of the specific codeblock .
5946 */
6047function createCodeBlock (array &$ codeTags , DOMNodeList &$ descriptions , $ lang , Parser &$ parser , \Highlight \Highlighter &$ h1 ) {
6148 if ($ lang == null ) {
@@ -89,4 +76,17 @@ function createCodeBlock(array &$codeTags, DOMNodeList &$descriptions, $lang, Pa
8976 $ return = createFrame ($ versions , $ return , false , 'inner ' );
9077
9178 return array ($ return , replaceLang ($ lang ));
92- }
79+ }
80+
81+ /**
82+ * Creates an HTML-Element to wrap around the content.
83+ *
84+ * @param string $content The content where the Element should wrap around
85+ * @param int $index The index of the element
86+ * @param string $extra Another class to be added to the element.
87+ *
88+ * @return string The full object.
89+ */
90+ function createTab (string &$ content , int $ index , string $ extra = 'outer ' ) {
91+ return '<div class=" ' .$ extra .' tab-content ' .($ index == 0 ? 'tc-active ' : '' ).'" data-tab=" ' .$ index .'"> ' .$ content .'</div> ' ;
92+ }
0 commit comments