public function DefaultController::lightbox2_contact in Lightbox2 8
Same name in this branch
- 8 src/DefaultController.php \Drupal\lightbox2\DefaultController::lightbox2_contact()
- 8 src/Controller/DefaultController.php \Drupal\lightbox2\Controller\DefaultController::lightbox2_contact()
1 string reference to 'DefaultController::lightbox2_contact'
File
- src/
Controller/ DefaultController.php, line 69 - Contains \Drupal\lightbox2\Controller\DefaultController.
Class
- DefaultController
- Default controller for the lightbox2 module.
Namespace
Drupal\lightbox2\ControllerCode
public function lightbox2_contact() {
if (module_exists('contact') && variable_get('lightbox2_enable_contact', FALSE) && user_access('access site-wide contact form')) {
$path = drupal_get_path('module', 'contact');
include_once $path . '/contact.pages.inc';
print drupal_render(drupal_get_form('contact_site_form'));
// drupal_add_js() with 'inline' didn't seem to work, possibly because this is
// AJAX loaded content.
print '<script type="text/javascript">Drupal.attachBehaviors();</script>';
exit;
}
}