public function setMainSection(Section $section)
    {
        if ($section === $this->_mainsection) {
            return $this;
        }

        $this->_mainsection = $section;
        $this->_position = 0;
        $this->_level = $section->getLevel();
        $section->setPage($this);

        return $this->setSection($section);
    }
public function setMainSection(Section $section)
    {
        if ($section === $this->_mainsection) {
            return $this;
        }

        $this->_mainsection = $section;
        $this->_position = 0;
        $this->_level = $section->getLevel();
        $section->setPage($this);

        return $this->setSection($section);
    }
public function setMainSection ( Section $ section ) { if ( $ section === $ this -> _mainsection ) { return $ this ; } $ this -> _mainsection = $ section ; $ this -> _position = 0 ; $ this -> _level = $ section -> getLevel ( ) ; $ section -> setPage ( $ this ) ; return $ this -> setSection ( $ section ) ; }
Sets the main section for this page.

@param  Section              $section

@return Page
Sets the main section for this page .