/** * Initiate class */ public function __construct() { $this->mobileContext = MobileContext::singleton(); $this->isMobileMode = $this->mobileContext->shouldDisplayMobileView(); $title = $this->getTitle(); if ($title->inNamespace(NS_USER) && !$title->isSubpage()) { $pageUserId = User::idFromName($title->getText()); if ($pageUserId) { $this->pageUser = User::newFromId($pageUserId); $this->isUserPage = true; } } }
/** * Initiate class */ public function __construct() { $this->mobileContext = MobileContext::singleton(); $this->isMobileMode = $this->mobileContext->shouldDisplayMobileView(); }