concrete/src/Page/Collection/Collection.php
public function getGlobalBlocks()
    {
        $db = Loader::db();
        $v = [Stack::ST_TYPE_GLOBAL_AREA];
        $rs = $db->GetCol('select stName from Stacks where Stacks.stType = ?', $v);
        $blocks = [];
        if (count($rs) > 0) {
            $pcp = new Permissions($this);
            foreach ($rs as $garHandle) {
                if ($pcp->canViewPageVersions()) {
                    $s = Stack::getByName($garHandle, 'RECENT');
                } else {
                    $s = Stack::getByName($garHandle, 'ACTIVE');
                }
                if (is_object($s)) {
                    $blocksTmp = $s->getBlocks(STACKS_AREA_NAME);
                    $blocks = array_merge($blocks, $blocksTmp);
                }
            }
        }

        return $blocks;
    }
public function getGlobalBlocks()
    {
        $db = Loader::db();
        $v = [Stack::ST_TYPE_GLOBAL_AREA];
        $rs = $db->GetCol('select stName from Stacks where Stacks.stType = ?', $v);
        $blocks = [];
        if (count($rs) > 0) {
            $pcp = new Permissions($this);
            foreach ($rs as $garHandle) {
                if ($pcp->canViewPageVersions()) {
                    $s = Stack::getByName($garHandle, 'RECENT');
                } else {
                    $s = Stack::getByName($garHandle, 'ACTIVE');
                }
                if (is_object($s)) {
                    $blocksTmp = $s->getBlocks(STACKS_AREA_NAME);
                    $blocks = array_merge($blocks, $blocksTmp);
                }
            }
        }

        return $blocks;
    }
public function getGlobalBlocks ( ) { $ db = Loader :: db ( ) ; $ v = [ Stack :: ST_TYPE_GLOBAL_AREA ] ; $ rs = $ db -> GetCol ( 'select stName from Stacks where Stacks.stType = ?' , $ v ) ; $ blocks = [ ] ; if ( count ( $ rs ) > 0 ) { $ pcp = new Permissions ( $ this ) ; foreach ( $ rs as $ garHandle ) { if ( $ pcp -> canViewPageVersions ( ) ) { $ s = Stack :: getByName ( $ garHandle , 'RECENT' ) ; } else { $ s = Stack :: getByName ( $ garHandle , 'ACTIVE' ) ; } if ( is_object ( $ s ) ) { $ blocksTmp = $ s -> getBlocks ( STACKS_AREA_NAME ) ; $ blocks = array_merge ( $ blocks , $ blocksTmp ) ; } } } return $ blocks ; }
Get the blocks contained in the all the global areas.

@return \Concrete\Core\Block\Block[]
Get the blocks contained in the all the global areas .