[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wysiwyg/src/template/components/ -> lmbWysiwygComponent.class.php (source)

   1  <?php
   2  /*

   3   * Limb PHP Framework

   4   *

   5   * @link http://limb-project.com

   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)

   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html

   8   */
   9  lmb_require('limb/wact/src/components/form/form.inc.php');
  10  
  11  /**

  12   * class lmbWysiwygComponent.

  13   *

  14   * @package wysiwyg

  15   * @version $Id: lmbWysiwygComponent.class.php 6009 2007-06-21 09:19:18Z serega $

  16   */
  17  class lmbWysiwygComponent extends WactTextAreaComponent
  18  {
  19    var $ini = null;
  20    var $group = null;
  21  
  22    function renderContents()
  23    {
  24      echo '<textarea';
  25      $this->renderAttributes();
  26      echo '>';
  27      echo htmlspecialchars($this->getValue(), ENT_QUOTES);
  28      echo '</textarea>';
  29    }
  30  
  31    function getIniOption($option)
  32    {
  33      if($value = $this->ini->getOption($option, $this->group))
  34        return $value;
  35      return '';
  36    }
  37  
  38    function initWysiwyg($ini_file_name, $group = null)
  39    {
  40      $this->ini = lmbToolkit :: instance()->getConf($ini_file_name);
  41      $this->group = $group;
  42  
  43      if(!$this->getAttribute('rows'))
  44        $this->setAttribute('rows', $this->getIniOption('rows'));
  45  
  46      if(!$this->getAttribute('cols'))
  47        $this->setAttribute('cols', $this->getIniOption('cols'));
  48  
  49      if(!$this->getAttribute('width'))
  50        $this->setAttribute('width', $this->getIniOption('width'));
  51  
  52      if(!$this->getAttribute('height'))
  53        $this->setAttribute('height', $this->getIniOption('height'));
  54    }
  55  }
  56  ?>


Generated: Fri Aug 29 04:49:26 2008 Cross-referenced by PHPXref 0.7