Пример #1
0
 public function filterList(ServiceBase $api, array $args, $acl = 'list')
 {
     if (!empty($args['q'])) {
         if (!empty($args['filter']) || !empty($args['deleted'])) {
             // These flags can be used with the filter API, but not with the search API
             throw new SugarApiExceptionInvalidParameter();
         }
         // We need to use unified search for this for compatibilty with Nomad
         require_once 'clients/base/api/UnifiedSearchApi.php';
         $search = new UnifiedSearchApi();
         $args['module_list'] = $args['module'];
         return $search->globalSearch($api, $args);
     }
     list($args, $q, $options, $seed) = $this->filterListSetup($api, $args, $acl);
     $api->action = 'list';
     return $this->runQuery($api, $args, $q, $options, $seed);
 }