• Модуль: conversion
  • Путь к файлу: ~/bitrix/modules/conversion/lib/internals/mobiledetect.php
  • Класс: BitrixConversionInternalsfor
  • Вызов: for::isMobile
public function isMobile($userAgent = null, $httpHeaders = null)
    {

        if ($httpHeaders) {
            $this->setHttpHeaders($httpHeaders);
        }

        if ($userAgent) {
            $this->setUserAgent($userAgent);
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        if ($this->checkHttpHeadersForMobile()) {
            return true;
        } else {
            return $this->matchDetectionRulesAgainstUA();
        }

    }