Location: PHPKode > projects > injooosm > administrator/components/com_injooosm/views/comments/view.html.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: view.html.php 2009-11-22 14:03:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport( 'joomla.application.component.view');

/**
 *
 */
class injooosmViewComments extends JView {
    /**
     *
     * @param object $tpl
     */
    function display($tpl = null) {
        global $mainframe, $option;

        if($this->getLayout() == 'form'):
            $this->_displayForm($tpl);
            return;
        endif;
        
	$model =& $this->getModel();
        $rows =& $this->get( 'Data');
	$total	= & $this->get( 'Total');
        $pagination = & $this->get( 'Pagination' );

        $this->assignRef('lists',	$lists);
        $this->assignRef( 'rows',   $rows);
        $this->assignRef('pagination',	$pagination);
        
        parent::display($tpl);
    }

    function _displayForm($tpl)  {

        $cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
        JArrayHelper::toInteger($cid);
        
        $model = $this->getModel();
        $comment = $model->getComment($cid);
        $editor =& JFactory::getEditor();

        $this->assignRef('comment',     $comment);
        $this->assignRef('editor',      $editor);

        parent::display($tpl);
    }
}
Return current item: injooosm