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.         switch ($type{
  30.         
  31.         case 'list_start':
  32.         
  33.             // pick the css type
  34.             $css $this->getConf('css_dl''');
  35.             if ($css{
  36.                 $css = " class=\"$css\"";
  37.             }
  38.             
  39.             // done!
  40.             return "<dl$css>\n";
  41.             break;
  42.         
  43.         case 'list_end':
  44.             return "</dl>\n\n";
  45.             break;
  46.         
  47.         case 'term_start':
  48.         
  49.             // pick the css type
  50.             $css $this->getConf('css_dt''');
  51.             if ($css{
  52.                 $css = " class=\"$css\"";
  53.             }
  54.             
  55.             // done!
  56.             return $pad . "<dt$css>";
  57.             break;
  58.         
  59.         case 'term_end':
  60.             return "</dt>\n";
  61.             break;
  62.         
  63.         case 'narr_start':
  64.         
  65.             // pick the css type
  66.             $css $this->getConf('css_dd''');
  67.             if ($css{
  68.                 $css = " class=\"$css\"";
  69.             }
  70.             
  71.             // done!
  72.             return $pad $pad . "<dd$css>";
  73.             break;
  74.         
  75.         case 'narr_end':
  76.             return "</dd>\n";
  77.             break;
  78.         
  79.         default:
  80.             return '';
  81.         
  82.         }
  83.     }
  84. }
  85. ?>

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