Пример #1
0
 private function postContactInfo(\Request $request)
 {
     $values = $request->getVars();
     Factory::post(Factory::load(), $values['vars']);
     $response = new \Http\SeeOtherResponse(\Server::getCurrentUrl(false));
     return $response;
 }
Пример #2
0
 private function locationString()
 {
     $json = array();
     $contact_info = \contact\Factory\ContactInfo::load();
     $physical_address = $contact_info->getPhysicalAddress();
     try {
         $json['address'] = Factory::getGoogleSearchString($physical_address);
     } catch (\Exception $e) {
         $json['error'] = $e->getMessage();
     }
     $response = new \View\JsonView($json);
     return $response;
 }
Пример #3
0
 protected function getHtmlView($data, \Request $request)
 {
     $content = \contact\Factory\ContactInfo::form($request, 'social');
     $view = new \View\HtmlView(\PHPWS_ControlPanel::display($content));
     return $view;
 }