public function getAggregatedBlock($blockName, $scopes = [])
    {
        $aggregatedData = new Block(['name' => $blockName]);
        if (array_key_exists($blockName, $this->_blocks)) {
            $scopes = $this->_getScopes($scopes);
            arsort($scopes);
            foreach ($scopes as $scope => $scopeOrder) {
                if (array_key_exists($scope, $this->_blocks[$blockName])) {
                    if ($scope == 'db') {
                        $aggregatedData->setBlockData($this->_blocks[$blockName][$scope]->blockData);
                        $aggregatedData->setGlobalData($this->_blocks[$blockName][$scope]->globalData);
                    } else {
                        $aggregatedData->combine($this->_blocks[$blockName][$scope]);
                    }
                }
            }
        }
        return $aggregatedData;
    }
public function getAggregatedBlock($blockName, $scopes = [])
    {
        $aggregatedData = new Block(['name' => $blockName]);
        if (array_key_exists($blockName, $this->_blocks)) {
            $scopes = $this->_getScopes($scopes);
            arsort($scopes);
            foreach ($scopes as $scope => $scopeOrder) {
                if (array_key_exists($scope, $this->_blocks[$blockName])) {
                    if ($scope == 'db') {
                        $aggregatedData->setBlockData($this->_blocks[$blockName][$scope]->blockData);
                        $aggregatedData->setGlobalData($this->_blocks[$blockName][$scope]->globalData);
                    } else {
                        $aggregatedData->combine($this->_blocks[$blockName][$scope]);
                    }
                }
            }
        }
        return $aggregatedData;
    }
public function getAggregatedBlock ( $ blockName , $ scopes = [ ] ) { $ aggregatedData = new Block ( [ 'name' => $ blockName ] ) ; if ( array_key_exists ( $ blockName , $ this -> _blocks ) ) { $ scopes = $ this -> _getScopes ( $ scopes ) ; arsort ( $ scopes ) ; foreach ( $ scopes as $ scope => $ scopeOrder ) { if ( array_key_exists ( $ scope , $ this -> _blocks [ $ blockName ] ) ) { if ( $ scope == 'db' ) { $ aggregatedData -> setBlockData ( $ this -> _blocks [ $ blockName ] [ $ scope ] -> blockData ) ; $ aggregatedData -> setGlobalData ( $ this -> _blocks [ $ blockName ] [ $ scope ] -> globalData ) ; } else { $ aggregatedData -> combine ( $ this -> _blocks [ $ blockName ] [ $ scope ] ) ; } } } } return $ aggregatedData ; }
Ignores template data from db scope
@param string $blockName
@param array $scopes
@return Block
Ignores template data from db scope