$this->_db], $options)); } if (null === $this->model) { $this->model = new Model(['db' => $this->_db]); } return $this->model; } public function getQuestions() { return $this->getModel()->getQuestions(); } public function update(array $data = []) { $data = empty($data) ? $this->_data : $data; $result = $this->getModel()->update($data, $this->_primaryKey); $this->_handleFiles(); return $result; } protected function _addDependenciesFromDb(array &$data) { $key = ['vendorId' => $data['id']]; $data['billingAddress'] = $this->getModel()->getBillingAddress($key); $data['mailingAddress'] = $this->getModel()->getMailingAddress($key); $data['partners'] = $this->getModel()->getPartners($data['id']); $data['businessReferences'] = $this->getModel()->getBusinessReferences($data['id']); $data['questionnaire'] = $this->getModel()->getQuestionnaire($data['id']); return $this; } public function getObjectInfo() { $info = parent::getObjectInfo(); return [ 'itemTitle' => $info['dbaName'], ]; } }