setSettings($settings); } /** * * set settings array * * @param array $settings * @return $this */ public function setSettings(array $settings) { $this->_settings = $settings; return $this; } /** * * render cookie usage confirmation message * * @return null|string */ public function cookieUsage() { $output = null; if ($this->_settings['enable_cookie_usage_confirmation']) { $view = $this->getView(); $bootstrap = Front::getInstance()->getBootstrap(); /** @var \Cube\Session $session */ $session = $bootstrap->getResource('session'); if (!$session->getCookie(self::COOKIE_USAGE)) { /** @var \Cube\View\Helper\Script $helper */ $helper = $view->getHelper('script'); $cookieKey = $session->getCookieKey(self::COOKIE_USAGE); $cookiePath = (!empty($view->baseUrl)) ? $view->baseUrl : $view::URI_DELIMITER; $helper->addBodyCode('') ->addBodyCode(" "); $translate = $this->getTranslate(); $output = ''; } } return $output; } }