Location: PHPKode > projects > Chalange > com_chalange/administrator/views/raceadmin/view.html.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

JHTML::stylesheet('chalange.css','administrator/components/com_chalange/assets/css/');

jimport('joomla.application.component.view');
/**
  * HTML View class for the mycomponent component
  * @package Mycomponent
  */
  class ChalangeAdminViewRaceAdmin extends JView{
  	function display($tpl=null){
  		$model=$this->getModel();
  		$raceTypesList=$model->getRaceTypesList();
  		JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');  		
   		$row=& JTable::getInstance('Races','Table');
   		$categories=$model->getCategories(null);//retorna todas las categorías disponibles
 
  		$this->assignRef('chalangeId',JRequest::getCmd('chalangeId'));
   		
  		$cid= JRequest::getVar('cid',array(0),'','array');
  		$id=$cid[0];
  		$task='';
  		if ($id==0){
  			$task='new';
  		}else{ 
  			$task='edit';
  			$row->load($id);
  			$this->assignRef('row',$row);
   			$categories=$model->getCategories($id);//retorna todas las categorías disponibles
  		}
  		$this->assignRef('categories',$categories);
  		$this->assignRef('task',$task);
  		$this->assignRef('raceTypesList',$raceTypesList);
  		parent::display($tpl);
  	}
  }
?>
Return current item: Chalange