1<?php 2/** 3 * Mikio Syntax Plugin: Row 4 * 5 * @link http://github.com/nomadjimbob/mikioplugin 6 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 7 * @author James Collins <james.collins@outlook.com.au> 8 */ 9if (!defined('DOKU_INC')) die(); 10if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 11require_once(dirname(__FILE__).'/core.php'); 12 13class syntax_plugin_mikioplugin_row extends syntax_plugin_mikioplugin_core { 14 public $tag = 'row'; 15 public $hasEndTag = true; 16 public $options = array( 17 'border-color' => array('type' => 'color', 'default' => ''), 18 'border-width' => array('type' => 'multisize', 'default' => ''), 19 'padding' => array('type' => 'multisize', 'default' => ''), 20 'margin' => array('type' => 'multisize', 'default' => ''), 21 ); 22 23 public function render_lexer_enter(Doku_Renderer $renderer, $data) { 24 $styles = $this->buildStyle(array( 25 'border-color' => $data['border-color'], 26 'border-width' => $data['border-width'], 27 'padding' => $data['padding'], 28 'margin' => $data['margin'], 29 ), TRUE); 30 31 $renderer->doc .= '<div class="' . $this->elemClass . ' ' . $this->classPrefix . 'row"' . $styles . '>'; 32 } 33 34 35 public function render_lexer_exit(Doku_Renderer $renderer, $data) { 36 $renderer->doc .= '</div>'; 37 } 38} 39?>