public function unused()
    {
        $ids = [];
        foreach ([$this->inFrontTheme(), $this->inBackTheme()] as $bundle) {
            foreach ($bundle as $region => $blocks) {
                foreach ($blocks as $block) {
                    $ids[] = $block->get('id');
                }
            }
        }

        $notIn = array_unique($ids);
        $notIn = empty($notIn) ? ['0'] : $notIn;

        return $this->find()
            ->where([
                'OR' => [
                    'Blocks.id NOT IN' => $notIn,
                    'Blocks.status' => 0,
                ]
            ])
            ->all()
            ->filter(function ($block) {
                return $block->renderable();
            });
    }
public function unused()
    {
        $ids = [];
        foreach ([$this->inFrontTheme(), $this->inBackTheme()] as $bundle) {
            foreach ($bundle as $region => $blocks) {
                foreach ($blocks as $block) {
                    $ids[] = $block->get('id');
                }
            }
        }

        $notIn = array_unique($ids);
        $notIn = empty($notIn) ? ['0'] : $notIn;

        return $this->find()
            ->where([
                'OR' => [
                    'Blocks.id NOT IN' => $notIn,
                    'Blocks.status' => 0,
                ]
            ])
            ->all()
            ->filter(function ($block) {
                return $block->renderable();
            });
    }
public function unused ( ) { $ ids = [ ] ; foreach ( [ $ this -> inFrontTheme ( ) , $ this -> inBackTheme ( ) ] as $ bundle ) { foreach ( $ bundle as $ region => $ blocks ) { foreach ( $ blocks as $ block ) { $ ids [ ] = $ block -> get ( 'id' ) ; } } } $ notIn = array_unique ( $ ids ) ; $ notIn = empty ( $ notIn ) ? [ '0' ] : $ notIn ; return $ this -> find ( ) -> where ( [ 'OR' => [ 'Blocks.id NOT IN' => $ notIn , 'Blocks.status' => 0 , ] ] ) -> all ( ) -> filter ( function ( $ block ) { return $ block -> renderable ( ) ; } ) ; }
Gets a list of all blocks that are NOT renderable.

@return \Cake\Collection\CollectionInterface
Gets a list of all blocks that are NOT renderable .