public function getBlockListInfo()
    {
        $blockList = [];
        foreach ($this->getBlockNames() as $blockName) {
            $importBlock = $this->getAggregatedBlock($blockName);
            $currentBlock = $this->getBlock($importBlock->blockData['name'], 'db');
            $blockList[$blockName] = [
                'block_name' => $blockName,
                'display_class' => 'none',
                'update_templates' => -1
            ];
            if ($importBlock->inCategoryTemplates || $importBlock->specifiedPageIds) {
                $blockList[$blockName]['display_class'] = 'info';
            }
            if ($this->hasChanges($importBlock, 'blockData')) {
                $blockList[$blockName]['display_class'] = 'update';
            }
            foreach (['templates', 'repeaterChildBlocks'] as $property) {
                if ($importBlock->$property) {
                    $blockList[$blockName]['update_templates'] = 0;
                }
                if ($this->hasChanges($importBlock, $property)) {
                    $blockList[$blockName]['display_class'] = 'update';
                    $blockList[$blockName]['update_templates'] = 1;
                    break;
                }
            }
            if (!($importBlock->templates || $importBlock->inRepeaterBlocks || $importBlock->inCategoryTemplates || $importBlock->specifiedPageIds)) {
                $blockList[$blockName]['display_class'] = 'delete';
            } elseif (!($currentBlock->templates || $currentBlock->inRepeaterBlocks || $currentBlock->inCategoryTemplates || $currentBlock->specifiedPageIds)) {
                $blockList[$blockName]['display_class'] = ($blockList[$blockName]['display_class'] == 'info') ? 'info' : 'new';
            } elseif ($this->hasChanges($importBlock, 'globalData')) {
                $blockList[$blockName]['display_class'] = 'update';
                $blockList[$blockName]['update_templates'] = 1;
            }
        }
        uasort($blockList, [$this, '_orderBlockChanges']);
        return $blockList;
    }
public function getBlockListInfo()
    {
        $blockList = [];
        foreach ($this->getBlockNames() as $blockName) {
            $importBlock = $this->getAggregatedBlock($blockName);
            $currentBlock = $this->getBlock($importBlock->blockData['name'], 'db');
            $blockList[$blockName] = [
                'block_name' => $blockName,
                'display_class' => 'none',
                'update_templates' => -1
            ];
            if ($importBlock->inCategoryTemplates || $importBlock->specifiedPageIds) {
                $blockList[$blockName]['display_class'] = 'info';
            }
            if ($this->hasChanges($importBlock, 'blockData')) {
                $blockList[$blockName]['display_class'] = 'update';
            }
            foreach (['templates', 'repeaterChildBlocks'] as $property) {
                if ($importBlock->$property) {
                    $blockList[$blockName]['update_templates'] = 0;
                }
                if ($this->hasChanges($importBlock, $property)) {
                    $blockList[$blockName]['display_class'] = 'update';
                    $blockList[$blockName]['update_templates'] = 1;
                    break;
                }
            }
            if (!($importBlock->templates || $importBlock->inRepeaterBlocks || $importBlock->inCategoryTemplates || $importBlock->specifiedPageIds)) {
                $blockList[$blockName]['display_class'] = 'delete';
            } elseif (!($currentBlock->templates || $currentBlock->inRepeaterBlocks || $currentBlock->inCategoryTemplates || $currentBlock->specifiedPageIds)) {
                $blockList[$blockName]['display_class'] = ($blockList[$blockName]['display_class'] == 'info') ? 'info' : 'new';
            } elseif ($this->hasChanges($importBlock, 'globalData')) {
                $blockList[$blockName]['display_class'] = 'update';
                $blockList[$blockName]['update_templates'] = 1;
            }
        }
        uasort($blockList, [$this, '_orderBlockChanges']);
        return $blockList;
    }
public function getBlockListInfo ( ) { $ blockList = [ ] ; foreach ( $ this -> getBlockNames ( ) as $ blockName ) { $ importBlock = $ this -> getAggregatedBlock ( $ blockName ) ; $ currentBlock = $ this -> getBlock ( $ importBlock -> blockData [ 'name' ] , 'db' ) ; $ blockList [ $ blockName ] = [ 'block_name' => $ blockName , 'display_class' => 'none' , 'update_templates' => - 1 ] ; if ( $ importBlock -> inCategoryTemplates || $ importBlock -> specifiedPageIds ) { $ blockList [ $ blockName ] [ 'display_class' ] = 'info' ; } if ( $ this -> hasChanges ( $ importBlock , 'blockData' ) ) { $ blockList [ $ blockName ] [ 'display_class' ] = 'update' ; } foreach ( [ 'templates' , 'repeaterChildBlocks' ] as $ property ) { if ( $ importBlock -> $ property ) { $ blockList [ $ blockName ] [ 'update_templates' ] = 0 ; } if ( $ this -> hasChanges ( $ importBlock , $ property ) ) { $ blockList [ $ blockName ] [ 'display_class' ] = 'update' ; $ blockList [ $ blockName ] [ 'update_templates' ] = 1 ; break ; } } if ( ! ( $ importBlock -> templates || $ importBlock -> inRepeaterBlocks || $ importBlock -> inCategoryTemplates || $ importBlock -> specifiedPageIds ) ) { $ blockList [ $ blockName ] [ 'display_class' ] = 'delete' ; } elseif ( ! ( $ currentBlock -> templates || $ currentBlock -> inRepeaterBlocks || $ currentBlock -> inCategoryTemplates || $ currentBlock -> specifiedPageIds ) ) { $ blockList [ $ blockName ] [ 'display_class' ] = ( $ blockList [ $ blockName ] [ 'display_class' ] == 'info' ) ? 'info' : 'new' ; } elseif ( $ this -> hasChanges ( $ importBlock , 'globalData' ) ) { $ blockList [ $ blockName ] [ 'display_class' ] = 'update' ; $ blockList [ $ blockName ] [ 'update_templates' ] = 1 ; } } uasort ( $ blockList , [ $ this , '_orderBlockChanges' ] ) ; return $ blockList ; }
Used in theme review view
Caches aggregated blocks as they are heavily used in other functions
Used in theme review view Caches aggregated blocks as they are heavily used in other functions