* @copyright (C) 2015-2020, Giuseppe Di Terlizzi */ class syntax_plugin_bootswrapper_carousel extends syntax_plugin_bootswrapper_bootstrap { public $p_type = 'block'; public $pattern_start = '(?=.*?)'; public $pattern_end = ''; public $tag_name = 'carousel'; public $tag_attributes = array( 'interval' => array( 'type' => 'integer', 'values' => null, 'required' => false, 'default' => 5000), 'pause' => array( 'type' => 'string', 'values' => null, 'required' => false, 'default' => 'hover'), 'wrap' => array( 'type' => 'boolean', 'values' => null, 'required' => false, 'default' => true), 'keyboard' => array( 'type' => 'boolean', 'values' => null, 'required' => false, 'default' => true), ); public function render($mode, Doku_Renderer $renderer, $data) { if (empty($data)) { return false; } if ($mode !== 'xhtml') { return false; } /** @var Doku_Renderer_xhtml $renderer */ list($state, $match, $pos, $attributes) = $data; if ($state == DOKU_LEXER_ENTER) { $html5_attributes = array(); foreach ($attributes as $attribute => $value) { $html5_attributes[] = 'data-' . $attribute . '="' . $value . '"'; } $markup = ''; return true; } return true; } }