diff options
author | Jens Averkamp <j.averkamp@two-developers.com> | 2015-06-26 16:38:44 +0300 |
---|---|---|
committer | Jens Averkamp <j.averkamp@two-developers.com> | 2015-06-26 16:38:44 +0300 |
commit | 1d1517cfe3e8bb6886fc3ce925c6ea1163aa926f (patch) | |
tree | 3619c77bc759c85c5ab969b73485c7d64232d3e4 /plugins/CoreAdminHome/OptOutManager.php | |
parent | 688bfc50306670b3a67dcdc8f3780613dbf5f689 (diff) |
Update OptOut View
Diffstat (limited to 'plugins/CoreAdminHome/OptOutManager.php')
-rw-r--r-- | plugins/CoreAdminHome/OptOutManager.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/CoreAdminHome/OptOutManager.php b/plugins/CoreAdminHome/OptOutManager.php index f2e1be2605..705b12fb6a 100644 --- a/plugins/CoreAdminHome/OptOutManager.php +++ b/plugins/CoreAdminHome/OptOutManager.php @@ -31,6 +31,9 @@ class OptOutManager /** @var string */ private $title; + /** + * @param DoNotTrackHeaderChecker $doNotTrackHeaderChecker + */ public function __construct(DoNotTrackHeaderChecker $doNotTrackHeaderChecker = null) { $this->doNotTrackHeaderChecker = $doNotTrackHeaderChecker ?: new DoNotTrackHeaderChecker(); @@ -47,8 +50,6 @@ class OptOutManager } /** - * Add javascript - * * @param string $javascript * @param bool $inline */ @@ -59,8 +60,6 @@ class OptOutManager } /** - * Return the javascripts array - * * @return array */ public function getJavascripts() @@ -69,8 +68,6 @@ class OptOutManager } /** - * Add Stylesheet - * * @param string $stylesheet * @param bool $inline */ @@ -81,8 +78,6 @@ class OptOutManager } /** - * Return the stylesheets array - * * @return array */ public function getStylesheets() @@ -106,6 +101,10 @@ class OptOutManager $this->title = $title; } + /** + * @return View + * @throws \Exception + */ public function createView() { $trackVisits = !IgnoreCookie::isIgnoreCookieFound(); @@ -142,6 +141,9 @@ class OptOutManager $view->isSafari = $this->isUserAgentSafari(); $view->showConfirmOnly = Common::getRequestVar('showConfirmOnly', false, 'int'); $view->reloadUrl = $reloadUrl; + $view->javascripts = $this->getJavascripts(); + $view->stylesheets = $this->getStylesheets(); + $view->title = $this->getTitle(); return $view; } @@ -154,6 +156,9 @@ class OptOutManager return $this->doNotTrackHeaderChecker; } + /** + * @return bool + */ protected function isUserAgentSafari() { $userAgent = @$_SERVER['HTTP_USER_AGENT'] ?: ''; |