Return to Snippet

Revision: 57558
at May 31, 2012 21:33 by kevincam


Initial Code
/**
 * Method to display a view.
 *
 * @param	boolean			If true, the view output will be cached
 * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
 *
 * @return	JController		This object to support chaining.
 * @since	1.5
 */
public function display($cachable = false, $urlparams = false)
{
	$cachable = true;

	// Get the document object.
	$document = JFactory::getDocument();

	$safeurlparams = array('catid'=>'INT', 'id'=>'INT', 'cid'=>'ARRAY', 'year'=>'INT', 'month'=>'INT', 'limit'=>'INT', 'limitstart'=>'INT', 'showall'=>'INT', 'return'=>'BASE64', 'filter'=>'STRING', 'filter_order'=>'CMD', 'filter_order_Dir'=>'CMD', 'filter-search'=>'STRING', 'print'=>'BOOLEAN', 'lang'=>'CMD');

	parent::display($cachable, $safeurlparams);

	return $this;
}

Initial URL

                                

Initial Description
This is a base function to use with Joomla! to display the view using the Joomla cache system.

Initial Title
Base display function to use Joomla! cache

Initial Tags
cache, joomla

Initial Language
PHP