/** * @copydoc Grid::build */ public function build() { if ($this->getState() == 'editForm') { $result = $this->form->build(); } elseif ($this->getState() == 'showResult') { $result = $this->results->build(); } else { $result = parent::build(); } return $result; }