You are here

public function MobileDetectTwig::isDevice in Mobile Detect 8.2

* Is device *

Parameters

string $deviceName is[iPhone|BlackBerry|HTC|Nexus|Dell|Motorola|Samsung|Sony|Asus|Palm|Vertu|...]: * @return boolean

File

src/Twig/MobileDetectTwig.php, line 66

Class

MobileDetectTwig
MobileDetectTwig class.

Namespace

Drupal\mobile_detect\Twig

Code

public function isDevice($deviceName) {
  $methodName = 'is' . strtolower((string) $deviceName);
  return $this->mobileDetector
    ->{$methodName}();
}