_getAutocompleteCompanyFilter(); $list = $this->_getDataObj()->getCompany4Select($filter); $response = array(); foreach ($list as $value => $title) { $response[] = compact('value', 'title'); } $this->_displayJson($response); return $this; } public function sendEmail2Admin($data) { $subject = SettingsObj::get($this->_settingsPrefix . 'Subject'); $from = SettingsObj::getEmailFrom($this->_settingsPrefix . 'From'); $to = SettingsObj::getFormEmails($this->_settingsPrefix . 'To'); $body = SettingsObj::get($this->_settingsPrefix . 'Body'); $data['link'] = '#'; if (false !== ($page = Qs_SiteMap::findFirst(null, array('type' => 'User\\Admin\\'), null))) { $data['link'] = $page['url'] . '?action=edit&id=' . $data['id']; } $this->_getDataObj()->prepareEmailData($data); foreach ($data as $field => $value) { if (is_array($value)) { continue; } $value = htmlspecialchars($value); $body = str_replace('{' . $field . '}', $value, $body); } $this->_sendMail(compact('subject', 'from', 'to', 'body')); return $this; } }