src/snac/client/webui/WebUIExecutor.php
/**
     * Display Constellation History Page
     *
     * Loads the version history page for a given constellation input into the display.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @param \snac\client\webui\display\Display $display The display object for page creation
     */
Display Constellation History Page
Loads the version history page for a given constellation input into the display.


Display Constellation History Page Loads the version history page for a given constellation input into the display .
public function displayHistoryPage(&$input, &$display) {
        $query = array();
        if (isset($input["constellationid"]))
            $query["constellationid"] = $input["constellationid"];
        if (isset($input["version"]))
            $query["version"] = $input["version"];
        if (isset($input["arkid"]))
            $query["arkid"] = $input["arkid"];
        $query["command"] = "constellation_history";
        $serverResponse = $this->connect->query($query);
        if (isset($serverResponse["constellation"])) {
            $display->setTemplate("history_page");
            if (\snac\Config::$DEBUG_MODE == true) {
                $display->addDebugData("serverResponse", json_encode($serverResponse, JSON_PRETTY_PRINT));
            }
            $this->logger->addDebug("Setting constellation data into the page template");
            $display->setData($serverResponse);
        } else {
            $this->logger->addDebug("Error page being drawn");
            $this->drawErrorPage($serverResponse, $display);
        }
    }
public function displayHistoryPage ( & $ input , & $ display ) { $ query = array ( ) ; if ( isset ( $ input [ " constellationid " ] ) ) $ query [ " constellationid " ] = $ input [ " constellationid " ] ; if ( isset ( $ input [ " version " ] ) ) $ query [ " version " ] = $ input [ " version " ] ; if ( isset ( $ input [ " arkid " ] ) ) $ query [ " arkid " ] = $ input [ " arkid " ] ; $ query [ " command " ] = " constellation_history " ; $ serverResponse = $ this -> connect -> query ( $ query ) ; if ( isset ( $ serverResponse [ " constellation " ] ) ) { $ display -> setTemplate ( " history_page " ) ; if ( \ snac \ Config :: $ DEBUG_MODE == true ) { $ display -> addDebugData ( " serverResponse " , json_encode ( $ serverResponse , JSON_PRETTY_PRINT ) ) ; } $ this -> logger -> addDebug ( " Setting constellation data into the page template " ) ; $ display -> setData ( $ serverResponse ) ; } else { $ this -> logger -> addDebug ( " Error page being drawn " ) ; $ this -> drawErrorPage ( $ serverResponse , $ display ) ; } }
Display Constellation History Page
 Loads the version history page for a given constellation input into the display.
Display Constellation History Page Loads the version history page for a given constellation input into the display .