Templating/PageBuilder.php
public function setOptions(array $options = array())
    {
        $options['inited'] = true;

        // Resolve merged options
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);
        $this->options = array_merge($this->options, $options);

        if (empty($this->options['blocks']['header'])) {
            $this->options['header'] = false;
        }

        if (!$this->options['header']) {
            $this->options['css'] = trim($this->options['css'].' no page header');
        }

        if (isset($options['keywords'])) {
            $this->options['metas']['keywords'] = $options['keywords'];
        }

        if (isset($options['description'])) {
            $this->options['metas']['description'] = $options['description'];
        }

        if ($seo = $this->seoPage) {
            $seo->setTitle($this->options['title']);
            $seo->addHtmlAttributes('lang', $this->options['locale']);

            if ($this->options['canonical']) {
                $seo->setLinkCanonical($this->options['canonical']);
            }

            foreach ($this->options['metas'] as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as $k => $v) {
                        $seo->addMeta('property', $k, $v);
                    }
                } else {
                    $seo->addMeta('name', $key, $value);
                }
            }
        }
    }
public function setOptions(array $options = array())
    {
        $options['inited'] = true;

        // Resolve merged options
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);
        $this->options = array_merge($this->options, $options);

        if (empty($this->options['blocks']['header'])) {
            $this->options['header'] = false;
        }

        if (!$this->options['header']) {
            $this->options['css'] = trim($this->options['css'].' no page header');
        }

        if (isset($options['keywords'])) {
            $this->options['metas']['keywords'] = $options['keywords'];
        }

        if (isset($options['description'])) {
            $this->options['metas']['description'] = $options['description'];
        }

        if ($seo = $this->seoPage) {
            $seo->setTitle($this->options['title']);
            $seo->addHtmlAttributes('lang', $this->options['locale']);

            if ($this->options['canonical']) {
                $seo->setLinkCanonical($this->options['canonical']);
            }

            foreach ($this->options['metas'] as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as $k => $v) {
                        $seo->addMeta('property', $k, $v);
                    }
                } else {
                    $seo->addMeta('name', $key, $value);
                }
            }
        }
    }
public function setOptions ( array $ options = array ( ) ) { $ options [ 'inited' ] = true ; // Resolve merged options $ resolver = new OptionsResolver ( ) ; $ this -> configureOptions ( $ resolver ) ; $ options = $ resolver -> resolve ( $ options ) ; $ this -> options = array_merge ( $ this -> options , $ options ) ; if ( empty ( $ this -> options [ 'blocks' ] [ 'header' ] ) ) { $ this -> options [ 'header' ] = false ; } if ( ! $ this -> options [ 'header' ] ) { $ this -> options [ 'css' ] = trim ( $ this -> options [ 'css' ] . ' no page header' ) ; } if ( isset ( $ options [ 'keywords' ] ) ) { $ this -> options [ 'metas' ] [ 'keywords' ] = $ options [ 'keywords' ] ; } if ( isset ( $ options [ 'description' ] ) ) { $ this -> options [ 'metas' ] [ 'description' ] = $ options [ 'description' ] ; } if ( $ seo = $ this -> seoPage ) { $ seo -> setTitle ( $ this -> options [ 'title' ] ) ; $ seo -> addHtmlAttributes ( 'lang' , $ this -> options [ 'locale' ] ) ; if ( $ this -> options [ 'canonical' ] ) { $ seo -> setLinkCanonical ( $ this -> options [ 'canonical' ] ) ; } foreach ( $ this -> options [ 'metas' ] as $ key => $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ k => $ v ) { $ seo -> addMeta ( 'property' , $ k , $ v ) ; } } else { $ seo -> addMeta ( 'name' , $ key , $ value ) ; } } } }
Set page options.

@param array $options
Set page options .