FOF30\Controller\DataController::browse PHP Method

browse() public method

Implements a default browse task, i.e. read a bunch of records and send them to the browser.
public browse ( ) : void
return void
    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);
    }