public function published($var = null)
    {
        if ($var !== null) {
            $this->published = (bool)$var;
        }

        // If not published, should not be visible in menus either
        if ($this->published === false) {
            $this->visible = false;
        }

        return $this->published;
    }
public function published($var = null)
    {
        if ($var !== null) {
            $this->published = (bool)$var;
        }

        // If not published, should not be visible in menus either
        if ($this->published === false) {
            $this->visible = false;
        }

        return $this->published;
    }
public function published ( $ var = null ) { if ( $ var !== null ) { $ this -> published = ( bool ) $ var ; } // If not published, should not be visible in menus either if ( $ this -> published === false ) { $ this -> visible = false ; } return $ this -> published ; }
Gets and Sets whether or not this Page is considered published

@param  bool $var true if the page is published

@return bool      true if the page is published
Gets and Sets whether or not this Page is considered published