public static function Utility::isModalRequest in AJAX Comments 8
Check if the request is for a modal dialog.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request object.
Return value
bool Whether or not the request was made using ajax.
1 call to Utility::isModalRequest()
- AjaxCommentsDeleteForm::buildForm in src/
Form/ AjaxCommentsDeleteForm.php - Form constructor.
File
- src/
Utility.php, line 206
Class
- Utility
- Provides various helper methods for Ajax Comments.
Namespace
Drupal\ajax_commentsCode
public static function isModalRequest(Request $request) {
return $request->query
->get(MainContentViewSubscriber::WRAPPER_FORMAT) === 'drupal_modal';
}