Devise\Pages\Interpreter\Modifiers\CreatePristineSection::afterTraverse PHP Method

afterTraverse() public method

After we traverse the tree, we are going to split the view into two parts. The first part is for devise editors and the second part is for pristine viewers
public afterTraverse ( array $nodes ) : array
$nodes array
return array
    public function afterTraverse(array $nodes)
    {
        $stmts = $this->DeviseParser->parse("<?php if (DeviseUser::checkConditions('canUseDeviseEditor')): ?>{{ devisehere }}<?php else: ?>{{ pristinehere}}<?php endif ?>");
        $stmts[0]->stmts = $this->cloned;
        $stmts[0]->else->stmts = $nodes;
        return $stmts;
    }