src/snac/client/webui/WebUIExecutor.php
/**
     * Display Landing Page
     *
     * Fills the display with the default homepage for SNAC.
     *
     * @param \snac\client\webui\display\Display $display The display object for page creation
     */
Display Landing Page
Fills the display with the default homepage for SNAC.


Display Landing Page Fills the display with the default homepage for SNAC .
public function displayLandingPage(&$display) {
        $request = array();
        $request["command"] = "recently_published";
        $response = $this->connect->query($request);
        $this->logger->addDebug("Got the following response from the server for recently published", array($response));
        if (!isset($response["constellation"])) {
            return $this->drawErrorPage($response, $display);
        }
        $recentConstellations = $response["constellation"];
        $recents = array();
        foreach ($recentConstellations as $constellationArray) {
            $constellation = new \snac\data\Constellation($constellationArray);
            array_push($recents, array(
                    "id"=>$constellation->getID(),
                    "nameEntry"=>$constellation->getPreferredNameEntry()->getOriginal()));
        }
        $display->setData(array("recents"=>$recents));
        $display->setTemplate("landing_page");
    }
public function displayLandingPage ( & $ display ) { $ request = array ( ) ; $ request [ " command " ] = " recently_published " ; $ response = $ this -> connect -> query ( $ request ) ; $ this -> logger -> addDebug ( " Got the following response from the server for recently published " , array ( $ response ) ) ; if ( ! isset ( $ response [ " constellation " ] ) ) { return $ this -> drawErrorPage ( $ response , $ display ) ; } $ recentConstellations = $ response [ " constellation " ] ; $ recents = array ( ) ; foreach ( $ recentConstellations as $ constellationArray ) { $ constellation = new \ snac \ data \ Constellation ( $ constellationArray ) ; array_push ( $ recents , array ( " id " => $ constellation -> getID ( ) , " nameEntry " => $ constellation -> getPreferredNameEntry ( ) -> getOriginal ( ) ) ) ; } $ display -> setData ( array ( " recents " => $ recents ) ) ; $ display -> setTemplate ( " landing_page " ) ; }
Display Landing Page
 Fills the display with the default homepage for SNAC.
Display Landing Page Fills the display with the default homepage for SNAC .
// Get the list of recently published constellations