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

jimport('joomla.application.component.view');
/**
  * HTML View Player class for the Chalange component
  * @package Chalange
  */
  class ChalangeViewPlayerform extends JView{
  	function display($tpl=null){
  		$model=& $this->getModel();
  		//$player=$model->getPlayer(JRequest::get('post'));
  		$idPlayer=JRequest::getCmd( 'idPlayer' );
  		$categories=$model->getCategories(JRequest::getCmd('idCarrera'));
  		if (!empty($idPlayer)){ //se trata de un corredor que ya existe en la base de datos
  			$player=$model->getPlayer($idPlayer);
  			$this->assignRef('licenceId',$idPlayer); //En caso de estar editando, el id de la persona
  			$this->assignRef('player',$player); //En caso de estar editando, los datos de la persona
  		} else {
  			$this->assignRef('nroLicence',JRequest::getCmd('licenceId'));//número de licencia introducida en el licenceForm
  		}
  		$this->assignRef('categories',$categories); // Array de categorías posibles en esta carrera
  		$this->assignRef('idCarrera',JRequest::getCmd( 'idCarrera' )); //id de la carrera
  		parent::display($tpl);
  	}
  }
?>
Return current item: Chalange