src/View.php
public function render(ViewModelInterface $model)
    {
        foreach ($model as $child) {
            $groupId = $child->getGroupId();
            if (empty($groupId)) {
                continue;
            }
            $result    = $this->render($child);
            $oldResult = $model->getVariable($groupId, '');
            $model->setVariable($groupId, $oldResult . $result);
        }

        $events = $this->getEvents();
        $event  = new ViewEvent($model);
        $events->trigger($event);

        return $event->getResult();
    }
public function render(ViewModelInterface $model)
    {
        foreach ($model as $child) {
            $groupId = $child->getGroupId();
            if (empty($groupId)) {
                continue;
            }
            $result    = $this->render($child);
            $oldResult = $model->getVariable($groupId, '');
            $model->setVariable($groupId, $oldResult . $result);
        }

        $events = $this->getEvents();
        $event  = new ViewEvent($model);
        $events->trigger($event);

        return $event->getResult();
    }
public function render ( ViewModelInterface $ model ) { foreach ( $ model as $ child ) { $ groupId = $ child -> getGroupId ( ) ; if ( empty ( $ groupId ) ) { continue ; } $ result = $ this -> render ( $ child ) ; $ oldResult = $ model -> getVariable ( $ groupId , '' ) ; $ model -> setVariable ( $ groupId , $ oldResult . $ result ) ; } $ events = $ this -> getEvents ( ) ; $ event = new ViewEvent ( $ model ) ; $ events -> trigger ( $ event ) ; return $ event -> getResult ( ) ; }
Renders the view model.

@param \Es\Mvc\ViewModelInterface $model The view model

@return mixed The result of rendering
Renders the view model .