Exemplo n.º 1
0
 /**
  *
  */
 public function admin_get($wl)
 {
     $responseData = array();
     /**
      * Create a list of widgets from the list of ID's passed in the $wl argument. 
      */
     $widgetList = explode(',', $wl);
     foreach ($widgetList as $widgetId) {
         if (!in_array($widgetId, $this->enabledWidgets)) {
             continue;
         }
         $name = \Lib\Inflector::toCamel($widgetId);
         $widget = $this->makeComponent("\\App\\Modules\\WidgetData\\Components\\{$name}", $this->theme());
         $responseData[$widgetId] = array('html' => $widget->output(), 'badge' => $widget->badge());
     }
     $this->response->view($responseData);
 }
Exemplo n.º 2
0
 /**
  * The domain code used for the URL. 
  */
 public function code()
 {
     return \Lib\Inflector::toCamel($this->name());
 }