1<?php 2/** 3 * Math Action element for the Ad-Hoc MathML plugin 4 * 5 * Defines <maction> ... </maction> syntax 6 * More info: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/maction 7 * 8 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 9 * @author Sascha Leib <sascha.leib(at)kolmio.com> 10 */ 11 12class syntax_plugin_adhocmathml_maction extends syntax_plugin_adhocmathml_abstract { 13 14 /* NOTE: The use of this element is no longer recommended. It is added here for completeness only! */ 15 16 protected $tag = 'maction'; 17 18 /* allow link attributes: */ 19 function allowSpecificAttribute(&$name, &$value) { 20 //dbg('MathML: <maction> - allowSpecificAttribute(' . $name . ', "' . $value . '")'); 21 22 switch (trim($name)) { 23 24 case 'selection': 25 return true; 26 break; 27 28 case 'actiontype': 29 return in_array(strtolower($value), array('statusline','toggle')); 30 break; 31 32 default: 33 return false; 34 } 35 } 36 37 /** 38 * ODT Renderer Functions 39 */ 40 function renderODTElementOpen($renderer, $HTMLelement, $data) { 41 $renderer->tablerow_open(); 42 } 43 function renderODTElementClose($renderer, $element) { 44 $renderer->tablerow_close(); 45 } 46}