function _fetch(&$counter, $params)
 {
     $result = parent::_fetch($counter, $params);
     $uri = new Uri($_SERVER['PHP_SELF']);
     foreach ($result as $key => $data) {
         if (is_integer($res = $uri->comparePath(new Uri($data['url'])))) {
             if ($res >= 0) {
                 $result[$key]['in_path'] = true;
             }
             if ($res == 0) {
                 $result[$key]['selected'] = true;
             }
         }
     }
     return $result;
 }
 protected function _fetch(&$counter, $params)
 {
     $tree_array = parent::_fetch($counter, $params);
     $group_params['order'] = array('priority' => 'ASC');
     $user_groups = $this->_getUserGroups();
     $dataspace = DataspaceRegistry::get('set_group_access');
     $groups = $dataspace->get('filter_groups');
     if (!is_array($groups) || !count($groups)) {
         return $tree_array;
     }
     foreach (array_keys($user_groups) as $key) {
         if (!in_array($key, $groups)) {
             unset($user_groups[$key]);
         }
     }
     foreach ($tree_array as $id => $node) {
         $object_id = $node['id'];
         foreach ($user_groups as $group_id => $group_data) {
             $tree_array[$id]['groups'][$group_id]['access_selector_name'] = 'policy[' . $object_id . '][' . $group_id . ']';
         }
     }
     return $tree_array;
 }