Lines Matching refs:attributes
192 * @param TagAttributes $attributes
195 public static function htmlEnter(\Doku_Renderer_xhtml $renderer, \DokuWiki_Syntax_Plugin $plugin, $attributes = null)
198 if ($attributes == null) {
199 $attributes = TagAttributes::createEmpty();
205 $display = $attributes->getValueAndRemove("display");
223 if ($attributes->getLogicalTag() != null) {
224 $logicalTag = $attributes->getLogicalTag();
227 $attributes->setLogicalTag($logicalTag . "-container");
231 * The container is the passed `attributes`
236 $codeAttributes->setType($attributes->getType());
237 $language = $attributes->getValue(TagAttributes::TYPE_KEY);
292 $attributes->addHtmlAfterEnterTag($codeHtml);
300 if ($attributes->hasComponentAttribute(self::LINE_NUMBERS_ATTR)) {
301 $attributes->removeComponentAttribute(self::LINE_NUMBERS_ATTR);
302 $attributes->addClassName("line-numbers");
313 if ($attributes->hasComponentAttribute("prompt")) {
314 $promptValue = $attributes->getValueAndRemove("prompt");
317 $attributes->addClassName("command-line");
318 $attributes->addOutputAttributeValue("data-prompt", $promptValue);
346 $attributes->addClassName("command-line");
347 $attributes->addOutputAttributeValue("data-prompt", $prompt);
355 if ($attributes->hasComponentAttribute("line-highlight")) {
356 $lineHiglight = $attributes->getValueAndRemove("line-highlight");
358 $attributes->addOutputAttributeValue('data-line', $lineHiglight);
363 $attributes->addOutputAttributeValue('data-download-link', true);
364 if ($attributes->hasComponentAttribute(syntax_plugin_combo_code::FILE_PATH_KEY)) {
365 $fileSrc = $attributes->getValueAndRemove(syntax_plugin_combo_code::FILE_PATH_KEY);
366 $attributes->addOutputAttributeValue('data-src', $fileSrc);
367 $attributes->addOutputAttributeValue('data-download-link-label', "Download " . $fileSrc);
370 $attributes->addOutputAttributeValue('data-src', $fileName);
376 $htmlCode = $attributes->toHtmlEnterTag("pre");
388 * @param TagAttributes $attributes
390 public static function htmlExit(\Doku_Renderer_xhtml $renderer, $attributes = null)
393 if ($attributes != null) {
397 $display = $attributes->getValueAndRemove("display");