public function collect(MvcEvent $mvcEvent)
    {
        $layout = $mvcEvent->getViewModel();
        $blocks = [];
        foreach ($this->layout->getBlocks() as $blockId => $block) {
            if ($parentBlock = $block->getOption('parent')) {
                $captureTo = $parentBlock . '::' . $block->captureTo();
            } else {
                $captureTo = $block->captureTo();
            }
            $blocks[$blockId] = [
                'instance' => $block,
                'template' => $this->resolveTemplate($block->getTemplate()),
                'capture_to' => $captureTo,
                'class' => get_class($block)
            ];
        }
        $data = [
            'handles' => $this->updater->getHandles(true),
            'layout_structure' => $this->updater->getLayoutStructure()->toArray(),
            'blocks' => $blocks,
            'layout_template' => $layout->getTemplate(),
            'current_area' => $this->updater->getArea()
        ];

        $this->data = $data;
        return $this;
    }
public function collect(MvcEvent $mvcEvent)
    {
        $layout = $mvcEvent->getViewModel();
        $blocks = [];
        foreach ($this->layout->getBlocks() as $blockId => $block) {
            if ($parentBlock = $block->getOption('parent')) {
                $captureTo = $parentBlock . '::' . $block->captureTo();
            } else {
                $captureTo = $block->captureTo();
            }
            $blocks[$blockId] = [
                'instance' => $block,
                'template' => $this->resolveTemplate($block->getTemplate()),
                'capture_to' => $captureTo,
                'class' => get_class($block)
            ];
        }
        $data = [
            'handles' => $this->updater->getHandles(true),
            'layout_structure' => $this->updater->getLayoutStructure()->toArray(),
            'blocks' => $blocks,
            'layout_template' => $layout->getTemplate(),
            'current_area' => $this->updater->getArea()
        ];

        $this->data = $data;
        return $this;
    }
public function collect ( MvcEvent $ mvcEvent ) { $ layout = $ mvcEvent -> getViewModel ( ) ; $ blocks = [ ] ; foreach ( $ this -> layout -> getBlocks ( ) as $ blockId => $ block ) { if ( $ parentBlock = $ block -> getOption ( 'parent' ) ) { $ captureTo = $ parentBlock . '::' . $ block -> captureTo ( ) ; } else { $ captureTo = $ block -> captureTo ( ) ; } $ blocks [ $ blockId ] = [ 'instance' => $ block , 'template' => $ this -> resolveTemplate ( $ block -> getTemplate ( ) ) , 'capture_to' => $ captureTo , 'class' => get_class ( $ block ) ] ; } $ data = [ 'handles' => $ this -> updater -> getHandles ( true ) , 'layout_structure' => $ this -> updater -> getLayoutStructure ( ) -> toArray ( ) , 'blocks' => $ blocks , 'layout_template' => $ layout -> getTemplate ( ) , 'current_area' => $ this -> updater -> getArea ( ) ] ; $ this -> data = $ data ; return $ this ; }
collect data for zdt

@param MvcEvent $mvcEvent
@return LayoutCollector
collect data for zdt