protected function initCookie()
    {
        $cookieOptions = Json::encode(
                            array_merge(
                                $this->cookieOptions,
                                [
                                    'classOuter'  => str_replace(' ', '.', $this->classOptions['classOuter']),
                                    'classInner'  => str_replace(' ', '.', $this->classOptions['classInner']),
                                    'classButton' => str_replace(' ', '.', $this->classOptions['classButton']),
                                ]
                            )
                        );
        $view = $this->getView();
        assets\CookieMonsterAsset::register($view);
        $view->registerJs("CookieMonster.init($cookieOptions);");
    }
protected function initCookie()
    {
        $cookieOptions = Json::encode(
                            array_merge(
                                $this->cookieOptions,
                                [
                                    'classOuter'  => str_replace(' ', '.', $this->classOptions['classOuter']),
                                    'classInner'  => str_replace(' ', '.', $this->classOptions['classInner']),
                                    'classButton' => str_replace(' ', '.', $this->classOptions['classButton']),
                                ]
                            )
                        );
        $view = $this->getView();
        assets\CookieMonsterAsset::register($view);
        $view->registerJs("CookieMonster.init($cookieOptions);");
    }
protected function initCookie ( ) { $ cookieOptions = Json :: encode ( array_merge ( $ this -> cookieOptions , [ 'classOuter' => str_replace ( ' ' , '.' , $ this -> classOptions [ 'classOuter' ] ) , 'classInner' => str_replace ( ' ' , '.' , $ this -> classOptions [ 'classInner' ] ) , 'classButton' => str_replace ( ' ' , '.' , $ this -> classOptions [ 'classButton' ] ) , ] ) ) ; $ view = $ this -> getView ( ) ; assets \ CookieMonsterAsset :: register ( $ view ) ; $ view -> registerJs ( "CookieMonster.init($cookieOptions);" ) ; }
Initialises the js file, prepares the JSON js options.
Initialises the js file prepares the JSON js options .