public function isMobileClient()
    {
        $request = $this->requestStack->getCurrentRequest();
        if ($request === null) {
            return false;
        }

        return preg_match(
            '/(android|blackberry|htc|iemobile|iphone|ipad|ipaq|ipod|nokia|playbook|smartphone)/i',
            $request->headers->get('User-Agent')
        );
    }
public function isMobileClient()
    {
        $request = $this->requestStack->getCurrentRequest();
        if ($request === null) {
            return false;
        }

        return preg_match(
            '/(android|blackberry|htc|iemobile|iphone|ipad|ipaq|ipod|nokia|playbook|smartphone)/i',
            $request->headers->get('User-Agent')
        );
    }
public function isMobileClient ( ) { $ request = $ this -> requestStack -> getCurrentRequest ( ) ; if ( $ request === null ) { return false ; } return preg_match ( '/(android|blackberry|htc|iemobile|iphone|ipad|ipaq|ipod|nokia|playbook|smartphone)/i' , $ request -> headers -> get ( 'User-Agent' ) ) ; }
Check if the page is viewed on a mobile device.

@return bool
Check if the page is viewed on a mobile device .