private function computePermissions($actions, $user, $node)
    {
        if (isset($node['attributes']['data-uri'])) {
            if($node['type'] == 'class'){
                $params = array('classUri' => $node['attributes']['data-uri']);
            } else {
                $params = array();
                foreach ($node['attributes'] as $key => $value) {
                    if (substr($key, 0, strlen('data-')) == 'data-') {
                        $params[substr($key, strlen('data-'))] = $value;
                    }
                }
            }
            $params['id'] = $node['attributes']['data-uri'];

            $node['permissions'] = $this->getActionService()->computePermissions($actions, $user, $params);
        }
        if (isset($node['children'])) {
            foreach($node['children'] as $index => $child){
                $node['children'][$index] = $this->computePermissions($actions, $user, $child);
            }
        }
        return $node;
    }
private function computePermissions($actions, $user, $node)
    {
        if (isset($node['attributes']['data-uri'])) {
            if($node['type'] == 'class'){
                $params = array('classUri' => $node['attributes']['data-uri']);
            } else {
                $params = array();
                foreach ($node['attributes'] as $key => $value) {
                    if (substr($key, 0, strlen('data-')) == 'data-') {
                        $params[substr($key, strlen('data-'))] = $value;
                    }
                }
            }
            $params['id'] = $node['attributes']['data-uri'];

            $node['permissions'] = $this->getActionService()->computePermissions($actions, $user, $params);
        }
        if (isset($node['children'])) {
            foreach($node['children'] as $index => $child){
                $node['children'][$index] = $this->computePermissions($actions, $user, $child);
            }
        }
        return $node;
    }
private function computePermissions ( $ actions , $ user , $ node ) { if ( isset ( $ node [ 'attributes' ] [ 'data-uri' ] ) ) { if ( $ node [ 'type' ] == 'class' ) { $ params = array ( 'classUri' => $ node [ 'attributes' ] [ 'data-uri' ] ) ; } else { $ params = array ( ) ; foreach ( $ node [ 'attributes' ] as $ key => $ value ) { if ( substr ( $ key , 0 , strlen ( 'data-' ) ) == 'data-' ) { $ params [ substr ( $ key , strlen ( 'data-' ) ) ] = $ value ; } } } $ params [ 'id' ] = $ node [ 'attributes' ] [ 'data-uri' ] ; $ node [ 'permissions' ] = $ this -> getActionService ( ) -> computePermissions ( $ actions , $ user , $ params ) ; } if ( isset ( $ node [ 'children' ] ) ) { foreach ( $ node [ 'children' ] as $ index => $ child ) { $ node [ 'children' ] [ $ index ] = $ this -> computePermissions ( $ actions , $ user , $ child ) ; } } return $ node ; }
compulte permissions for a node against actions

@deprecated

@param array[] $actions the actions data with context, name and the resolver
@param User $user the user
@param array $node a tree node
@return array the node augmented with permissions
compulte permissions for a node against actions