Neos.Neos/Classes/ViewHelpers/Backend/ChangeStatsViewHelper.php
public function render(array $changeCounts)
    {
        $this->templateVariableContainer->add('newCountRatio', $changeCounts['new'] / $changeCounts['total'] * 100);
        $this->templateVariableContainer->add('changedCountRatio', $changeCounts['changed'] / $changeCounts['total'] * 100);
        $this->templateVariableContainer->add('removedCountRatio', $changeCounts['removed'] / $changeCounts['total'] * 100);
        $content = $this->renderChildren();
        $this->templateVariableContainer->remove('newCountRatio');
        $this->templateVariableContainer->remove('changedCountRatio');
        $this->templateVariableContainer->remove('removedCountRatio');

        return $content;
    }
public function render(array $changeCounts)
    {
        $this->templateVariableContainer->add('newCountRatio', $changeCounts['new'] / $changeCounts['total'] * 100);
        $this->templateVariableContainer->add('changedCountRatio', $changeCounts['changed'] / $changeCounts['total'] * 100);
        $this->templateVariableContainer->add('removedCountRatio', $changeCounts['removed'] / $changeCounts['total'] * 100);
        $content = $this->renderChildren();
        $this->templateVariableContainer->remove('newCountRatio');
        $this->templateVariableContainer->remove('changedCountRatio');
        $this->templateVariableContainer->remove('removedCountRatio');

        return $content;
    }
public function render ( array $ changeCounts ) { $ this -> templateVariableContainer -> add ( 'newCountRatio' , $ changeCounts [ 'new' ] / $ changeCounts [ 'total' ] * 100 ) ; $ this -> templateVariableContainer -> add ( 'changedCountRatio' , $ changeCounts [ 'changed' ] / $ changeCounts [ 'total' ] * 100 ) ; $ this -> templateVariableContainer -> add ( 'removedCountRatio' , $ changeCounts [ 'removed' ] / $ changeCounts [ 'total' ] * 100 ) ; $ content = $ this -> renderChildren ( ) ; $ this -> templateVariableContainer -> remove ( 'newCountRatio' ) ; $ this -> templateVariableContainer -> remove ( 'changedCountRatio' ) ; $ this -> templateVariableContainer -> remove ( 'removedCountRatio' ) ; return $ content ; }
Expects an array of change count data and adds calculated ratios to the rendered child view

@param array $changeCounts Expected keys: new, changed, removed
@return string
Expects an array of change count data and adds calculated ratios to the rendered child view