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

        if ($this->visible === null) {
            // Set item visibility in menu if folder is different from slug
            // eg folder = 01.Home and slug = Home
            if (preg_match(PAGE_ORDER_PREFIX_REGEX, $this->folder)) {
                $this->visible = true;
            } else {
                $this->visible = false;
            }
        }

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

        if ($this->visible === null) {
            // Set item visibility in menu if folder is different from slug
            // eg folder = 01.Home and slug = Home
            if (preg_match(PAGE_ORDER_PREFIX_REGEX, $this->folder)) {
                $this->visible = true;
            } else {
                $this->visible = false;
            }
        }

        return $this->visible;
    }
public function visible ( $ var = null ) { if ( $ var !== null ) { $ this -> visible = ( bool ) $ var ; } if ( $ this -> visible === null ) { // Set item visibility in menu if folder is different from slug // eg folder = 01.Home and slug = Home if ( preg_match ( PAGE_ORDER_PREFIX_REGEX , $ this -> folder ) ) { $ this -> visible = true ; } else { $ this -> visible = false ; } } return $ this -> visible ; }
Gets and Sets whether or not this Page is visible for navigation

@param  bool $var true if the page is visible

@return bool      true if the page is visible
Gets and Sets whether or not this Page is visible for navigation