_getDataObj()->setPrimaryKey($this->_doc->getAuthData('vendorId')); return parent::exec(); } protected function _getFormOptions($type = null) { $options = parent::_getFormOptions($type); if (in_array($type, ['edit'])) { $options['questions'] = $this->_getDataObj()->getQuestions(); } return $options; } protected function _doEdit() { if (null === ($data = $this->_getDataObj()->getData())) { $this->_doc->displayError($this->_createMessage(static::MSG_DATA_UNAVAILABLE)); return $this; } if (!$this->_lock()) { $this->_doc->displayError($this->_createMessage(static::MSG_LOCKED, $this->_getLocker())); return $this; } $form = $this->_getEditForm(['defaults' => $data]); $form->setDefaults(); $this->_addFormItem($form); $this->_postEdit(); return $this; } }