/** * */ 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); }
/** * The domain code used for the URL. */ public function code() { return \Lib\Inflector::toCamel($this->name()); }
?> </h1> </div> </div> <?php foreach ($domain->params() as $sectionName => $vars) { ?> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> <span class="tools pull-right" data-tools="toggle" data-collapsed="false" data-collapse-footer="true"></span> <?php echo \Lib\Inflector::camelToHuman($sectionName); ?> </div> <div class="panel-body"> <?php foreach ($vars as $varName => $var) { ?> <div class="form-group"> <?php echo $html->input(array_merge($var, array('name' => $varName, 'label' => ['before' => $var['title']], 'attributes' => ['class' => 'form-control updateOnBlur', 'data-section' => $sectionName, 'data-url' => "{$url_app_params_root}/{$domainName}"]))); ?> </div> <?php } ?>