public function accessLevels()
    {
        $accessLevels = [];
        foreach ($this->all() as $page) {
            if (isset($page->header()->access)) {
                if (\is_array($page->header()->access)) {
                    foreach ($page->header()->access as $index => $accessLevel) {
                        if (\is_array($accessLevel)) {
                            foreach ($accessLevel as $innerIndex => $innerAccessLevel) {
                                $accessLevels[] = $innerIndex;
                            }
                        } else {
                            $accessLevels[] = $index;
                        }
                    }
                } else {
                    $accessLevels[] = $page->header()->access;
                }
            }
        }

        return array_unique($accessLevels);
    }
public function accessLevels()
    {
        $accessLevels = [];
        foreach ($this->all() as $page) {
            if (isset($page->header()->access)) {
                if (\is_array($page->header()->access)) {
                    foreach ($page->header()->access as $index => $accessLevel) {
                        if (\is_array($accessLevel)) {
                            foreach ($accessLevel as $innerIndex => $innerAccessLevel) {
                                $accessLevels[] = $innerIndex;
                            }
                        } else {
                            $accessLevels[] = $index;
                        }
                    }
                } else {
                    $accessLevels[] = $page->header()->access;
                }
            }
        }

        return array_unique($accessLevels);
    }
public function accessLevels ( ) { $ accessLevels = [ ] ; foreach ( $ this -> all ( ) as $ page ) { if ( isset ( $ page -> header ( ) -> access ) ) { if ( \ is_array ( $ page -> header ( ) -> access ) ) { foreach ( $ page -> header ( ) -> access as $ index => $ accessLevel ) { if ( \ is_array ( $ accessLevel ) ) { foreach ( $ accessLevel as $ innerIndex => $ innerAccessLevel ) { $ accessLevels [ ] = $ innerIndex ; } } else { $ accessLevels [ ] = $ index ; } } } else { $ accessLevels [ ] = $ page -> header ( ) -> access ; } } } return array_unique ( $ accessLevels ) ; }
Get access levels of the site pages

@return array
Get access levels of the site pages