Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Source for file Deflist.php

Documentation is available at Deflist.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_Xhtml_Deflist extends Text_Wiki_Render {
  4.     
  5.     var $conf = array(
  6.         'css_dl' => null,
  7.         'css_dt' => null,
  8.         'css_dd' => null
  9.     );
  10.     
  11.     /**
  12.     * 
  13.     * Renders a token into text matching the requested format.
  14.     * 
  15.     * @access public
  16.     * 
  17.     * @param array $options The "options" portion of the token (second
  18.     *  element).
  19.     * 
  20.     * @return string The text rendered from the token options.
  21.     * 
  22.     */
  23.     
  24.     function token($options)
  25.     {
  26.         $type $options['type'];
  27.         $pad "    ";
  28.         
  29.         // pick the css type
  30.         $css $this->getConf('css''');
  31.         if ($css{
  32.             $css = " class=\"$css\"";
  33.         }
  34.         
  35.         switch ($type{
  36.         
  37.         case 'list_start':
  38.         
  39.             // pick the css type
  40.             $css $this->getConf('css_dl''');
  41.             if ($css{
  42.                 $css = " class=\"$css\"";
  43.             }
  44.             
  45.             // done!
  46.             return "<dl>\n";
  47.             break;
  48.         
  49.         case 'list_end':
  50.             return "</dl>\n\n";
  51.             break;
  52.         
  53.         case 'term_start':
  54.         
  55.             // pick the css type
  56.             $css $this->getConf('css_dt''');
  57.             if ($css{
  58.                 $css = " class=\"$css\"";
  59.             }
  60.             
  61.             // done!
  62.             return $pad "<dt>";
  63.             break;
  64.         
  65.         case 'term_end':
  66.             return "</dt>\n";
  67.             break;
  68.         
  69.         case 'narr_start':
  70.         
  71.             // pick the css type
  72.             $css $this->getConf('css_dd''');
  73.             if ($css{
  74.                 $css = " class=\"$css\"";
  75.             }
  76.             
  77.             // done!
  78.             return $pad $pad "<dd>";
  79.             break;
  80.         
  81.         case 'narr_end':
  82.             return "</dd>\n";
  83.             break;
  84.         
  85.         default:
  86.             return '';
  87.         
  88.         }
  89.     }
  90. }
  91. ?>

Documentation generated on Mon, 11 Mar 2019 13:51:28 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.