src/Gzero/Cms/BlockFinder.php
protected function getFilterArray($onlyActive)
    {
        $cacheKey = ($onlyActive) ? 'public' : 'admin';
        if ($this->cache->tags(['blocks'])->has('blocks:filter:' . $cacheKey)) {
            return $this->cache->tags(['blocks'])->get('blocks:filter:' . $cacheKey);
        } else {
            $blocks = $this->blockRepository->getBlocksWithFilter($onlyActive);
            $filter = $this->buildFilterArray($blocks);
            $this->cache->tags(['blocks'])->forever('blocks:filter:' . $cacheKey, $filter);
            return $filter;
        }
    }
protected function getFilterArray($onlyActive)
    {
        $cacheKey = ($onlyActive) ? 'public' : 'admin';
        if ($this->cache->tags(['blocks'])->has('blocks:filter:' . $cacheKey)) {
            return $this->cache->tags(['blocks'])->get('blocks:filter:' . $cacheKey);
        } else {
            $blocks = $this->blockRepository->getBlocksWithFilter($onlyActive);
            $filter = $this->buildFilterArray($blocks);
            $this->cache->tags(['blocks'])->forever('blocks:filter:' . $cacheKey, $filter);
            return $filter;
        }
    }
protected function getFilterArray ( $ onlyActive ) { $ cacheKey = ( $ onlyActive ) ? 'public' : 'admin' ; if ( $ this -> cache -> tags ( [ 'blocks' ] ) -> has ( 'blocks:filter:' . $ cacheKey ) ) { return $ this -> cache -> tags ( [ 'blocks' ] ) -> get ( 'blocks:filter:' . $ cacheKey ) ; } else { $ blocks = $ this -> blockRepository -> getBlocksWithFilter ( $ onlyActive ) ; $ filter = $ this -> buildFilterArray ( $ blocks ) ; $ this -> cache -> tags ( [ 'blocks' ] ) -> forever ( 'blocks:filter:' . $ cacheKey , $ filter ) ; return $ filter ; } }
It builds filter array with all blocks

@param bool $onlyActive Filter only public blocks

@return array
It builds filter array with all blocks