[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/html/html/ -> content.php (source)

   1  <?php
   2  /**
   3  * @version        $Id:  $
   4  * @package        Joomla.Framework
   5  * @subpackage    HTML
   6  * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   7  * @license        GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // no direct access
  16  defined('_JEXEC') or die('Restricted access');
  17  
  18  JLoader::register('JTableContent', JPATH_LIBRARIES . DS . 'joomla' . DS . 'database' . DS . 'table' . DS . 'content.php');
  19  
  20  /**
  21   * Utility class to fire onPrepareContent for non-article based content.
  22   *
  23   * @package     Joomla.Framework
  24   * @subpackage    HTML
  25   * @since        1.5
  26   */
  27  class JHTMLContent
  28  {
  29      /**
  30       * Fire onPrepareContent for content that isn't part of an article.
  31       *
  32       * @param string The content to be transformed.
  33       * @param array The content params.
  34       * @return string The content after transformation.
  35       */
  36  	function prepare($text, $params = null)
  37      {
  38          if ($params === null) {
  39              $params = array();
  40          }
  41          /*
  42           * Create a skeleton of an article. This is a bit of a hack.
  43           */
  44          $nodb = null;
  45          $article = new JTableContent($nodb);
  46          $article->text = $text;
  47          JPluginHelper::importPlugin('content');
  48          $dispatcher = &JDispatcher::getInstance();
  49          $results = $dispatcher->trigger(
  50              'onPrepareContent', array (&$article, &$params, 0)
  51          );
  52  
  53          return $article->text;
  54      }
  55  
  56  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1