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
768302
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;
    }
1250291
protected static function isIterable($variable)
    {
        if (version_compare(PHP_VERSION, 7.1) === -1) {
            return is_array($variable) || ($variable instanceof \Traversable);
        } else {
            return is_iterable($variable);
        }
    }
928178
public function remove($var=null)
    {
        if (empty($var)) {
            return $this->destroy(session_id());
        }

        $this->unsets[] = $var;

        if (isset($_SESSION[$var])) {
            unset($_SESSION[$var]);
        }
        else {
            $path = explode('.', $var);
            $key = array_pop($path);
            $node = &$this->get_node($path, $_SESSION);
            unset($node[$key]);
        }

        return true;
    }
305573
public function isset(string $var):bool{
		return (
				$this->global && (
					isset($_ENV[$var])
					|| getenv($var)
					|| (function_exists('apache_getenv') && apache_getenv($var))
				)
			) || array_key_exists($var, $this->_ENV);
	}
294044
public function eTag($var = null)
    {
        if ($var !== null) {
            $this->etag = $var;
        }
        if (!isset($this->etag)) {
            $this->etag = (bool)Grav::instance()['config']->get('system.pages.etag');
        }

        return $this->etag;
    }
281586
public function path($var = null)
    {
        if ($var !== null) {
            // Folder of the page.
            $this->folder = basename($var);
            // Path to the page.
            $this->path = dirname($var);
        }

        return $this->path ? $this->path . '/' . $this->folder : null;
    }
327698
private function walk($var)
    {
        $output = [];
        foreach ($var as $index => $item) {
            $output[$index] = is_array($item) || $item instanceof Traversable
                ? $this->collect($item)
                : $this->atomic($item);
        }

        return $output;
    }
770977
public function setIsCurrentValue($var)
    {
        $wrappedVar = is_null($var) ? null : new \Google\Protobuf\BoolValue(['value' => $var]);
        return $this->setIsCurrent($wrappedVar);
    }
439536
public function route($var = null)
    {
        if ($var !== null) {
            $this->route = $var;
        }

        if (empty($this->route)) {
            $baseRoute = null;

            // calculate route based on parent slugs
            $parent = $this->parent();
            if (isset($parent)) {
                if ($this->hide_home_route && $parent->route() === $this->home_route) {
                    $baseRoute = '';
                } else {
                    $baseRoute = (string)$parent->route();
                }
            }

            $this->route = isset($baseRoute) ? $baseRoute . '/' . $this->slug() : null;

            if (!empty($this->routes) && isset($this->routes['default'])) {
                $this->routes['aliases'][] = $this->route;
                $this->route = $this->routes['default'];

                return $this->route;
            }
        }

        return $this->route;
    }
6394
public function themeVarFunc($var, $default = null)
    {
        $header = $this->grav['page']->header();
        $header_classes = $header->{$var} ?? null;

        return $header_classes ?: $this->config->get('theme.' . $var, $default);
    }
142121
public function has($var)
    {
        if (!is_string($var)) {
            throw new \InvalidArgumentException('Expected a string. Got: ' . (is_object($var) ? get_class($var) : gettype($var)));
        }
        return isset($this->{$var}) && !empty($this->{$var});
    }
1079198
public function get(string $var)
    {
        if (!$this->mainNode) {
            return null;
        }

        $node = $this->mainNode->getLastByKey($var);
        if ($node === null) {
            return null;
        }

        return $node->getData();
    }
1190404
public function setWindow($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1\TimeWindow::class);
        $this->window = $var;

        return $this;
    }
528631
function is_page_visible( $slug ) {
            if ( $this->is_admin_page( $slug ) ) {
                return true;
            }

            return $this->_menu->is_submenu_item_visible( $slug, true, true );
        }
272301
public function __isset($var)
    {
        // Look for access of the form {ns:var}. We don't use
        // _children() here because we can break out of the loop
        // immediately once we find something.
        if (strpos($var, ':') !== false) {
            list($ns, $elt) = explode(':', $var, 2);
            foreach ($this->_element->childNodes as $child) {
                if ($child->localName == $elt && $child->prefix == $ns) {
                    return true;
                }
            }
        } else {
            foreach ($this->_element->childNodes as $child) {
                if ($child->localName == $var) {
                    return true;
                }
            }
        }
    }
1105450
protected function shouldShowInNavigation(&$page)
    {
        if (isset($page['rcmOnly'])
            && $page['rcmOnly']
            && empty($this->page)
        ) {
            return false;
        }

        if (isset($page['acl']) && is_array($page['acl'])
            && !empty($page['acl']['resource'])
        ) {
            $privilege = null;
            if (!empty($page['acl']['privilege'])) {
                $privilege = $page['acl']['privilege'];
            }

            $resource = $page['acl']['resource'];

            $resource = str_replace(
                [
                    ':siteId',
                    ':pageName'
                ],
                [
                    $this->currentSite->getSiteId(),
                    $this->page->getName()
                ],
                $resource
            );

            if (!empty($this->page)) {
                $resource = str_replace(
                    [
                        ':siteId',
                        ':pageName'
                    ],
                    [
                        $this->currentSite->getSiteId(),
                        $this->page->getName()
                    ],
                    $resource
                );
            } else {
                $resource = str_replace(
                    [':siteId'],
                    [$this->currentSite->getSiteId()],
                    $resource
                );
            }

            if (!$this->isAllowed->__invoke(
                GetPsrRequest::invoke(),
                $resource,
                $privilege
            )
            ) {
                return false;
            }
        }

        return true;
    }
1151769
public static function isEmpty($variable): bool
    {
        $result = true;
        if (!empty($variable) && is_array($variable)) {
            foreach ($variable as $value) {
                $result = $result && self::isEmpty($value);
            }
        } else {
            $result = empty($variable);
        }

        return $result;
    }