예제 #1
0
 /**
  * method:	render
  *
  * This method will render this plugin using the default information,
  * unless you ignore that and do your own thing
  *
  * params:
  * 	$id		-	the id of the view to render, the "default" view is the first one to load
  * 	$params	-	an array of variables to make available to the view
  */
 public function render($id = "default", $params = array())
 {
     $params["resource"] = Amslib_Router::getResource();
     $params["body"] = strtolower($params["resource"]);
     $params["route"] = Amslib_Router::getName();
     $params["site_title"] = $this->getSiteTitle();
     $params["url_home"] = $this->getURL("home");
     $params["meta_description"] = $this->getValue("meta_description");
     $params["meta_author"] = $this->getValue("meta_author");
     if (strpos($params["route"], "error") !== false) {
         $params["data"] = $this->getErrorData();
     } else {
         $params["logo"] = $this->getFile("/resources/logo.png");
         $params["url_about"] = $this->getURL("about-framework");
         $params["url_gettingstarted"] = $this->getURL("getting-started");
         $params["url_examples"] = $this->getURL("examples");
         $params["url_plugins"] = $this->getURL("plugins");
         $params["url_webservices"] = $this->getURL("webservices");
         $params["url_api"] = $this->getURL("api");
         $params["url_documentation"] = $this->getURL("documentation");
         $params["url_testframework"] = $this->getURL("test-framework");
     }
     $params["content"] = $this->renderView($params["resource"], $params);
     return $this->renderView("Skeleton", $params);
 }
예제 #2
0
 /**
  * method:	render
  * 
  * This method will render this plugin using the default information, 
  * unless you ignore that and do your own thing
  * 
  * params:
  * 	$id		-	the id of the view to render, the "default" view is the first one to load
  * 	$params	-	an array of variables to make available to the view
  */
 public function render($id = "default", $params = array())
 {
     $resource = Amslib_Router::getResource();
     $route = Amslib_Router::getName();
     switch ($route) {
         case "hello_world":
             //	Do you want to do something cusomised?
             $params["jabba_the_hut"] = "gimme a kiss beautiful";
             $params["luke_skywalker"] = "kissed his sister";
             $params["han_solo"] = "he shot first";
     }
     $params["content"] = $this->renderView($resource, $params);
     return $this->renderView("Skeleton", $params);
 }
예제 #3
0
 /**
  * 	method:	getRouteName
  *
  * 	todo: write documentation
  */
 public function getRouteName()
 {
     return Amslib_Router::getName();
 }