src/snac/client/webui/WebUIExecutor.php
/**
     * Display Preview Page
     *
     * Fills the display for a view page for the constellation object passed as input.  This is useful for the
     * edit page to be able to draw a preview.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @param \snac\client\webui\display\Display $display The display object for page creation
     */
Display Preview Page
Fills the display for a view page for the constellation object passed as input.  This is useful for the
edit page to be able to draw a preview.


Display Preview Page Fills the display for a view page for the constellation object passed as input . This is useful for the edit page to be able to draw a preview .
public function displayPreviewPage(&$input, &$display) {
        $mapper = new \snac\client\webui\util\ConstellationPostMapper();
        $mapper->allowTermLookup();
        $mapper->mapAsNewConstellation();
        $constellation = $mapper->serializeToConstellation($input);
        if ($constellation != null) {
            $display->setTemplate("detailed_preview_page");
            if (isset($input["view"]) && $input["view"] == "hrt") {
                $display->setTemplate("view_page");
            }
            if (\snac\Config::$DEBUG_MODE === true) {
                $display->addDebugData("constellationSource", $constellation->toJSON());
            }
            $this->logger->addDebug("Setting constellation data into the page template");
            $display->setData(array_merge($constellation->toArray(), array("preview" => true)));
        }
    }
public function displayPreviewPage ( & $ input , & $ display ) { $ mapper = new \ snac \ client \ webui \ util \ ConstellationPostMapper ( ) ; $ mapper -> allowTermLookup ( ) ; $ mapper -> mapAsNewConstellation ( ) ; $ constellation = $ mapper -> serializeToConstellation ( $ input ) ; if ( $ constellation != null ) { $ display -> setTemplate ( " detailed_preview_page " ) ; if ( isset ( $ input [ " view " ] ) && $ input [ " view " ] == " hrt " ) { $ display -> setTemplate ( " view_page " ) ; } if ( \ snac \ Config :: $ DEBUG_MODE === true ) { $ display -> addDebugData ( " constellationSource " , $ constellation -> toJSON ( ) ) ; } $ this -> logger -> addDebug ( " Setting constellation data into the page template " ) ; $ display -> setData ( array_merge ( $ constellation -> toArray ( ) , array ( " preview " => true ) ) ) ; } }
Display Preview Page
 Fills the display for a view page for the constellation object passed as input.
Display Preview Page Fills the display for a view page for the constellation object passed as input .
// If just previewing, then all the information should come VIA post to build the preview // Get the constellation object