src/snac/client/webui/WebUIExecutor.php
/**
     * Perform User Search
     *
     * Asks the Server to search the current users of the system for the given search terms.  Returns
     * the list of results as a JSON-ready web ui response.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @return string[] The web ui's response to the client (array ready for json_encode)
     */
Perform User Search
Asks the Server to search the current users of the system for the given search terms.  Returns
the list of results as a JSON-ready web ui response.

@param string[] $input Post/Get inputs from the webui
@return string[] The web ui's response to the client (array ready for json_encode)
Perform User Search Asks the Server to search the current users of the system for the given search terms . Returns the list of results as a JSON - ready web ui response . @param string [] $input Post / Get inputs from the webui @return string [] The web ui ' s response to the client ( array ready for json_encode )
public function performUserSearch(&$input) {
        $this->logger->addDebug("Searching users");
        $request = array ();
        $request["command"] = "search_users";
        $queryString = "";
        if (isset($input["q"]))
            $queryString = $input["q"];
        $request["query_string"] = $queryString;
        if (isset($input["count"]))
            $request["count"] = $input["count"];
        if (isset($input["role"]))
            $request["role"] = $input["role"];
        $serverResponse = $this->connect->query($request);
        if (!isset($serverResponse["results"]))
            return $serverResponse;
        if (isset($input["format"]) && $input["format"] == "term") {
        } else {
            $results = $serverResponse["results"];
            $serverResponse["results"] = array();
            foreach ($results as $k => $v) {
                $serverResponse["results"][$k]["id"] = $v["userid"];
                $serverResponse["results"][$k]["value"] = $v["fullName"] ." (".$v["userName"].")";
                $serverResponse["results"][$k]["text"] = $serverResponse["results"][$k]["value"];
            }
        }
        $this->logger->addDebug("Sending response back to client", $serverResponse);
        return $serverResponse;
    }
public function performUserSearch ( & $ input ) { $ this -> logger -> addDebug ( " Searching users " ) ; $ request = array ( ) ; $ request [ " command " ] = " search_users " ; $ queryString = " " ; if ( isset ( $ input [ " q " ] ) ) $ queryString = $ input [ " q " ] ; $ request [ " query_string " ] = $ queryString ; if ( isset ( $ input [ " count " ] ) ) $ request [ " count " ] = $ input [ " count " ] ; if ( isset ( $ input [ " role " ] ) ) $ request [ " role " ] = $ input [ " role " ] ; $ serverResponse = $ this -> connect -> query ( $ request ) ; if ( ! isset ( $ serverResponse [ " results " ] ) ) return $ serverResponse ; if ( isset ( $ input [ " format " ] ) && $ input [ " format " ] == " term " ) { } else { $ results = $ serverResponse [ " results " ] ; $ serverResponse [ " results " ] = array ( ) ; foreach ( $ results as $ k => $ v ) { $ serverResponse [ " results " ] [ $ k ] [ " id " ] = $ v [ " userid " ] ; $ serverResponse [ " results " ] [ $ k ] [ " value " ] = $ v [ " fullName " ] . "  ( " . $ v [ " userName " ] . " ) " ; $ serverResponse [ " results " ] [ $ k ] [ " text " ] = $ serverResponse [ " results " ] [ $ k ] [ " value " ] ; } } $ this -> logger -> addDebug ( " Sending response back to client " , $ serverResponse ) ; return $ serverResponse ; }
Perform User Search
 Asks the Server to search the current users of the system for the given search terms.
Perform User Search Asks the Server to search the current users of the system for the given search terms .
// This is a strict query for a controlled vocabulary term // Send the query to the server // keep the results as normal Term elements // Send the response back to the web client