public function browse()
{
// Initialise the savestate
$saveState = $this->input->get('savestate', -999, 'int');
if ($saveState == -999) {
$saveState = true;
}
$this->getModel()->savestate($saveState);
// Apply the Form name
$formName = 'form.default';
if (!empty($this->layout)) {
$formName = 'form.' . $this->layout;
}
$this->getModel()->setFormName($formName);
// Do we have a _valid_ form?
$form = $this->getModel()->getForm();
if ($form !== false) {
$this->hasForm = true;
if (empty($this->layout)) {
$this->layout = 'default';
}
}
// Display the view
$this->display(in_array('browse', $this->cacheableTasks), $this->cacheParams);
}