public function setForm(TForm $form) { if ($this->_form === null) { $this->_form = $form; } else { throw new TInvalidOperationException('page_form_duplicated'); } }