app/code/community/Nexcessnet/Turpentine/Block/Adminhtml/Cache/Grid.php
protected function _prepareCollection()
    {
        parent::_prepareCollection();
        $collection = $this->getCollection();
        $turpentineEnabled = false;
        $fullPageEnabled = false;
        foreach ($collection as $key=>$item) {
            if ($item->getStatus() == 1 && ($item->getId() == 'turpentine_pages' || $item->getId() == 'turpentine_esi_blocks')) {
                $turpentineEnabled = true;
            }
            if ($item->getStatus() == 1 && $item->getId() == 'full_page') {
                $fullPageEnabled = true;
            }
        }
        if ($turpentineEnabled  && !$fullPageEnabled) {
            $collection->removeItemByKey('full_page');
        }
        if ($fullPageEnabled && !$turpentineEnabled) {
            $collection->removeItemByKey('turpentine_pages');
            $collection->removeItemByKey('turpentine_esi_blocks');
        }
        $this->setCollection($collection);
        return $this;
    }
protected function _prepareCollection()
    {
        parent::_prepareCollection();
        $collection = $this->getCollection();
        $turpentineEnabled = false;
        $fullPageEnabled = false;
        foreach ($collection as $key=>$item) {
            if ($item->getStatus() == 1 && ($item->getId() == 'turpentine_pages' || $item->getId() == 'turpentine_esi_blocks')) {
                $turpentineEnabled = true;
            }
            if ($item->getStatus() == 1 && $item->getId() == 'full_page') {
                $fullPageEnabled = true;
            }
        }
        if ($turpentineEnabled  && !$fullPageEnabled) {
            $collection->removeItemByKey('full_page');
        }
        if ($fullPageEnabled && !$turpentineEnabled) {
            $collection->removeItemByKey('turpentine_pages');
            $collection->removeItemByKey('turpentine_esi_blocks');
        }
        $this->setCollection($collection);
        return $this;
    }
protected function _prepareCollection ( ) { parent :: _prepareCollection ( ) ; $ collection = $ this -> getCollection ( ) ; $ turpentineEnabled = false ; $ fullPageEnabled = false ; foreach ( $ collection as $ key => $ item ) { if ( $ item -> getStatus ( ) == 1 && ( $ item -> getId ( ) == 'turpentine_pages' || $ item -> getId ( ) == 'turpentine_esi_blocks' ) ) { $ turpentineEnabled = true ; } if ( $ item -> getStatus ( ) == 1 && $ item -> getId ( ) == 'full_page' ) { $ fullPageEnabled = true ; } } if ( $ turpentineEnabled && ! $ fullPageEnabled ) { $ collection -> removeItemByKey ( 'full_page' ) ; } if ( $ fullPageEnabled && ! $ turpentineEnabled ) { $ collection -> removeItemByKey ( 'turpentine_pages' ) ; $ collection -> removeItemByKey ( 'turpentine_esi_blocks' ) ; } $ this -> setCollection ( $ collection ) ; return $ this ; }
Prepare grid collection
Prepare grid collection