1<?php 2/** 3 * Mikio Syntax Plugin: List Group 4 * 5 * Syntax: <LISTGROUP-ITEM [active] [disabled]></LISTGROUP-ITEM> 6 * 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 * @author James Collins <james.collins@outlook.com.au> 9 */ 10 11if (!defined('DOKU_INC')) die(); 12if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 13require_once(dirname(__FILE__).'/core.php'); 14 15class syntax_plugin_mikioplugin_listgroupitem extends syntax_plugin_mikioplugin_core { 16 public $tag = 'listgroup-item'; 17 public $options = array( 18 'active', 19 'disabled', 20 'type' => array('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark') 21 ); 22 23 24 public function render_lexer_enter(Doku_Renderer $renderer, $data) { 25 $classes = $this->buildClassString($data, array('active', 'disabled', 'type'), array('list-group-item-' => array('type'))); 26 27 $renderer->doc .= '<li class="list-group-item' . $classes . '">'; 28 } 29 30 31 public function render_lexer_exit(Doku_Renderer $renderer, $data) { 32 $renderer->doc .= '</li>'; 33 } 34} 35?>