original_string: private function getAllowedSystemResources(&$manifest)
      {
          foreach ($this->data as $serviceName => $resource) {
              foreach ($resource as $resourceName => $records) {
                  foreach ($records as $record) {
                      $api = $serviceName . '/' . $resourceName;
                      switch ($api) {
                          case 'system/user':
                          case 'system/admin':
                              $manifest['service'][$serviceName][$resourceName][] = [
                                  'username'   => array_get($record, 'username'),
                                  'email'      => array_get($record, 'email'),
                                  'first_name' => array_get($record, 'first_name'),
                                  'last_name'  => array_get($record, 'last_name')
                              ];
                              break;
                          case 'system/cors':
                              $manifest['service'][$serviceName][$resourceName][] = array_get($record, 'id');
                              break;
                          default:
                              $manifest['service'][$serviceName][$resourceName][] = array_get($record, 'name');
                              break;
                      }
                  }
              }
          }
      }
code: private function getAllowedSystemResources(&$manifest)
      {
          foreach ($this->data as $serviceName => $resource) {
              foreach ($resource as $resourceName => $records) {
                  foreach ($records as $record) {
                      $api = $serviceName . '/' . $resourceName;
                      switch ($api) {
                          case 'system/user':
                          case 'system/admin':
                              $manifest['service'][$serviceName][$resourceName][] = [
                                  'username'   => array_get($record, 'username'),
                                  'email'      => array_get($record, 'email'),
                                  'first_name' => array_get($record, 'first_name'),
                                  'last_name'  => array_get($record, 'last_name')
                              ];
                              break;
                          case 'system/cors':
                              $manifest['service'][$serviceName][$resourceName][] = array_get($record, 'id');
                              break;
                          default:
                              $manifest['service'][$serviceName][$resourceName][] = array_get($record, 'name');
                              break;
                      }
                  }
              }
          }
      }
code_tokens: private function getAllowedSystemResources ( & $ manifest ) { foreach ( $ this -> data as $ serviceName => $ resource ) { foreach ( $ resource as $ resourceName => $ records ) { foreach ( $ records as $ record ) { $ api = $ serviceName . '/' . $ resourceName ; switch ( $ api ) { case 'system/user' : case 'system/admin' : $ manifest [ 'service' ] [ $ serviceName ] [ $ resourceName ] [ ] = [ 'username' => array_get ( $ record , 'username' ) , 'email' => array_get ( $ record , 'email' ) , 'first_name' => array_get ( $ record , 'first_name' ) , 'last_name' => array_get ( $ record , 'last_name' ) ] ; break ; case 'system/cors' : $ manifest [ 'service' ] [ $ serviceName ] [ $ resourceName ] [ ] = array_get ( $ record , 'id' ) ; break ; default : $ manifest [ 'service' ] [ $ serviceName ] [ $ resourceName ] [ ] = array_get ( $ record , 'name' ) ; break ; } } } } }
docstring: Gets all system resources based on RBAC
  
  @param array $manifest
docstring_tokens: Gets all system resources based on RBAC