.

ContactBaseController Class Reference

Defines a view route for contact forms. More...

Inheritance diagram for ContactBaseController:
ControllerBase IController IEventSink ContactController

List of all members.

Public Member Functions

  action_contact_form ($page_data)
  Show search result.
  get_routes ()
  Return array of routes this controller takes responsability.

Protected Member Functions

  get_base_route ()
  Base path of all contact form related routes.

Detailed Description

Defines a view route for contact forms.

Author:
Gerd Riesselmann

Definition at line 8 of file contact.basecontroller.php.


Member Function Documentation

ContactBaseController::action_contact_form ( page_data  ) 

Show search result.

Parameters:
$page_data  PageData

Definition at line 35 of file contact.basecontroller.php.

00035                                                         {
00036                 $page_data->in_history = false;
00037                 $page_data->head->robots_index = ROBOTS_NOINDEX_FOLLOW;
00038                 $page_data->breadcrumb = array(tr('Contact', 'contact'));
00039                 $page_data->head->title = tr('Contact Us', 'contact');
00040                 $page_data->head->description = tr('Send us an e-mail through the contact form.', 'contact');
00041 
00042                 Load::tools('formhandler');
00043                 $formhandler = new FormHandler('frmcontact');
00044                 if ($page_data->has_post_data()) {
00045                         $this->do_contact_form($page_data, $formhandler);
00046                 }
00047 
00048                 $view = ViewFactory::create_view(IViewFactory::CONTENT, 'contact/form', $page_data);
00049                 $formhandler->prepare_view($view);
00050                 $view->render(); 
00051         }
ContactBaseController::get_base_route (  )  [protected]

Base path of all contact form related routes.

Returns:
string

Definition at line 26 of file contact.basecontroller.php.

00026                                             {
00027                 return 'contact';
00028         }
ContactBaseController::get_routes (  ) 

Return array of routes this controller takes responsability.

Reimplemented from ControllerBase.

Definition at line 13 of file contact.basecontroller.php.

00013                                      {
00014                 $base = $this->get_base_route();
00015                 $ret = array(
00016                         'form' => new ExactMatchRoute("$base/", $this, 'contact_form', new NoCacheCacheManager()),
00017                 );
00018                 return $ret;
00019         }

The documentation for this class was generated from the following file: