Neos\Neos\ViewHelpers\Backend\ChangeStatsViewHelper::render PHP Метод

render() публичный Метод

Expects an array of change count data and adds calculated ratios to the rendered child view
public render ( array $changeCounts ) : string
$changeCounts array Expected keys: new, changed, removed
Результат string
    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;
    }
ChangeStatsViewHelper