private function KernelEventListener::canRequestGetNode in Permissions by Term 8
Same name and namespace in other branches
- 8.2 src/Listener/KernelEventListener.php \Drupal\permissions_by_term\Listener\KernelEventListener::canRequestGetNode()
1 call to KernelEventListener::canRequestGetNode()
- KernelEventListener::onKernelRequest in src/
Listener/ KernelEventListener.php - Access restriction on kernel request.
File
- src/
Listener/ KernelEventListener.php, line 141
Class
- KernelEventListener
- Class KernelEventListener.
Namespace
Drupal\permissions_by_term\ListenerCode
private function canRequestGetNode(Request $request) {
if (method_exists($request->attributes, 'get') && !empty($request->attributes
->get('node'))) {
if (method_exists($request->attributes
->get('node'), 'get')) {
return TRUE;
}
}
return FALSE;
}