src/snac/client/webui/WebUIExecutor.php
/**
     * Handle Visualization Commands
     *
     * Acts on the subcommand argument passed in the input, and returns either the desired
     * visualization view or the data required by a visualization.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @param \snac\client\webui\display\Display $display The display object for page creation
     * @return string[] The web ui's response to the client (array ready for json_encode)
     */
Handle Visualization Commands
Acts on the subcommand argument passed in the input, and returns either the desired
visualization view or the data required by a visualization.


Handle Visualization Commands Acts on the subcommand argument passed in the input and returns either the desired visualization view or the data required by a visualization .
public function handleVisualization(&$input, &$display) {
        if (isset($input["subcommand"])) {
            $serverResponse = $this->getConstellation($input, $display, "summary");
            $constellation = $serverResponse["constellation"];
            if (\snac\Config::$DEBUG_MODE == true) {
                $display->addDebugData("constellationSource", json_encode($serverResponse["constellation"], JSON_PRETTY_PRINT));
                $display->addDebugData("serverResponse", json_encode($serverResponse, JSON_PRETTY_PRINT));
            }
            if (isset($serverResponse["constellation"])) {
                switch ($input["subcommand"]) {
                    case "connection_data":
                        return $this->getConnectionGraphData($input, $constellation);
                        break;
                    case "connection_graph":
                        $display->setTemplate("neo4j_graph_page");
                        $display->setData($constellation);
                        return;
                    case "radial_graph":
                        $display->setTemplate("radial_graph_page");
                        $display->setData($constellation);
                        return;
                }
            } else {
                $this->logger->addDebug("Error page being drawn");
                $this->drawErrorPage($serverResponse, $display);
            }
        }
        $this->logger->addDebug("Error page being drawn");
        $this->drawErrorPage("Subcommand required", $display);
    }
public function handleVisualization ( & $ input , & $ display ) { if ( isset ( $ input [ " subcommand " ] ) ) { $ serverResponse = $ this -> getConstellation ( $ input , $ display , " summary " ) ; $ constellation = $ serverResponse [ " constellation " ] ; if ( \ snac \ Config :: $ DEBUG_MODE == true ) { $ display -> addDebugData ( " constellationSource " , json_encode ( $ serverResponse [ " constellation " ] , JSON_PRETTY_PRINT ) ) ; $ display -> addDebugData ( " serverResponse " , json_encode ( $ serverResponse , JSON_PRETTY_PRINT ) ) ; } if ( isset ( $ serverResponse [ " constellation " ] ) ) { switch ( $ input [ " subcommand " ] ) { case " connection_data " : return $ this -> getConnectionGraphData ( $ input , $ constellation ) ; break ; case " connection_graph " : $ display -> setTemplate ( " neo4j_graph_page " ) ; $ display -> setData ( $ constellation ) ; return ; case " radial_graph " : $ display -> setTemplate ( " radial_graph_page " ) ; $ display -> setData ( $ constellation ) ; return ; } } else { $ this -> logger -> addDebug ( " Error page being drawn " ) ; $ this -> drawErrorPage ( $ serverResponse , $ display ) ; } } $ this -> logger -> addDebug ( " Error page being drawn " ) ; $ this -> drawErrorPage ( " Subcommand required " , $ display ) ; }
Handle Visualization Commands
 Acts on the subcommand argument passed in the input, and returns either the desired
 visualization view or the data required by a visualization.
Handle Visualization Commands Acts on the subcommand argument passed in the input and returns either the desired visualization view or the data required by a visualization .
// No constellation error // No subcommand error