english/components/com_content/views/categories/view.html.php
/**
	 * Display the view
	 *
	 * @return	mixed	False on error, null otherwise.
	 */
Display the view
@return      mixed   False on error, null otherwise.
Display the view @return mixed False on error null otherwise .
function display($tpl = null)
	{
		$state		= $this->get('State');
		$items		= $this->get('Items');
		$parent		= $this->get('Parent');
		if (count($errors = $this->get('Errors'))) {
			JError::raiseWarning(500, implode("\n", $errors));
			return false;
		}
		if ($items === false)
		{
			JError::raiseError(404, JText::_('COM_CONTENT_ERROR_CATEGORY_NOT_FOUND'));
			return false;
		}
		if ($parent == false)
		{
			JError::raiseError(404, JText::_('COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND'));
			return false;
		}
		$params = &$state->params;
		$items = array($parent->id => $items);
		$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
		$this->assign('maxLevelcat',	$params->get('maxLevelcat', -1));
		$this->assignRef('params',		$params);
		$this->assignRef('parent',		$parent);
		$this->assignRef('items',		$items);
		$this->_prepareDocument();
		parent::display($tpl);
	}
function display ( $ tpl = null ) { $ state = $ this -> get ( 'State' ) ; $ items = $ this -> get ( 'Items' ) ; $ parent = $ this -> get ( 'Parent' ) ; if ( count ( $ errors = $ this -> get ( 'Errors' ) ) ) { JError :: raiseWarning ( 500 , implode ( " \n " , $ errors ) ) ; return false ; } if ( $ items === false ) { JError :: raiseError ( 404 , JText :: _ ( 'COM_CONTENT_ERROR_CATEGORY_NOT_FOUND' ) ) ; return false ; } if ( $ parent == false ) { JError :: raiseError ( 404 , JText :: _ ( 'COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND' ) ) ; return false ; } $ params = & $ state -> params ; $ items = array ( $ parent -> id => $ items ) ; $ this -> pageclass_sfx = htmlspecialchars ( $ params -> get ( 'pageclass_sfx' ) ) ; $ this -> assign ( 'maxLevelcat' , $ params -> get ( 'maxLevelcat' , - 1 ) ) ; $ this -> assignRef ( 'params' , $ params ) ; $ this -> assignRef ( 'parent' , $ parent ) ; $ this -> assignRef ( 'items' , $ items ) ; $ this -> _prepareDocument ( ) ; parent :: display ( $ tpl ) ; }
Display the view
 @return      mixed   False on error, null otherwise.
Display the view @return mixed False on error null otherwise .
// Initialise variables // Check for errors. //Escape strings for HTML output