Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php
protected function computeChangesCount(Workspace $selectedWorkspace)
    {
        $changesCount = ['new' => 0, 'changed' => 0, 'removed' => 0, 'total' => 0];
        foreach ($this->computeSiteChanges($selectedWorkspace) as $siteChanges) {
            foreach ($siteChanges['documents'] as $documentChanges) {
                foreach ($documentChanges['changes'] as $change) {
                    if ($change['node']->isRemoved()) {
                        $changesCount['removed']++;
                    } elseif ($change['isNew']) {
                        $changesCount['new']++;
                    } else {
                        $changesCount['changed']++;
                    };
                    $changesCount['total']++;
                }
            }
        }

        return $changesCount;
    }
protected function computeChangesCount(Workspace $selectedWorkspace)
    {
        $changesCount = ['new' => 0, 'changed' => 0, 'removed' => 0, 'total' => 0];
        foreach ($this->computeSiteChanges($selectedWorkspace) as $siteChanges) {
            foreach ($siteChanges['documents'] as $documentChanges) {
                foreach ($documentChanges['changes'] as $change) {
                    if ($change['node']->isRemoved()) {
                        $changesCount['removed']++;
                    } elseif ($change['isNew']) {
                        $changesCount['new']++;
                    } else {
                        $changesCount['changed']++;
                    };
                    $changesCount['total']++;
                }
            }
        }

        return $changesCount;
    }
protected function computeChangesCount ( Workspace $ selectedWorkspace ) { $ changesCount = [ 'new' => 0 , 'changed' => 0 , 'removed' => 0 , 'total' => 0 ] ; foreach ( $ this -> computeSiteChanges ( $ selectedWorkspace ) as $ siteChanges ) { foreach ( $ siteChanges [ 'documents' ] as $ documentChanges ) { foreach ( $ documentChanges [ 'changes' ] as $ change ) { if ( $ change [ 'node' ] -> isRemoved ( ) ) { $ changesCount [ 'removed' ] ++ ; } elseif ( $ change [ 'isNew' ] ) { $ changesCount [ 'new' ] ++ ; } else { $ changesCount [ 'changed' ] ++ ; } ; $ changesCount [ 'total' ] ++ ; } } } return $ changesCount ; }
Computes the number of added, changed and removed nodes for the given workspace

@param Workspace $selectedWorkspace
@return array
Computes the number of added changed and removed nodes for the given workspace