Add App->mobileDetect property
This commit is contained in:
parent
fbf73ef3a7
commit
f6092ebebb
1 changed files with 8 additions and 0 deletions
|
@ -101,6 +101,11 @@ class App
|
||||||
*/
|
*/
|
||||||
private $isAjax;
|
private $isAjax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var MobileDetect
|
||||||
|
*/
|
||||||
|
public $mobileDetect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a stylesheet file path to be included in the <head> tag of every page.
|
* Register a stylesheet file path to be included in the <head> tag of every page.
|
||||||
* Inclusion is done in App->initHead().
|
* Inclusion is done in App->initHead().
|
||||||
|
@ -268,6 +273,9 @@ class App
|
||||||
|
|
||||||
// Detect mobile devices
|
// Detect mobile devices
|
||||||
$mobile_detect = new MobileDetect();
|
$mobile_detect = new MobileDetect();
|
||||||
|
|
||||||
|
$this->mobileDetect = $mobile_detect;
|
||||||
|
|
||||||
$this->is_mobile = $mobile_detect->isMobile();
|
$this->is_mobile = $mobile_detect->isMobile();
|
||||||
$this->is_tablet = $mobile_detect->isTablet();
|
$this->is_tablet = $mobile_detect->isTablet();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue