1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
6 * @author op5 Valerij Stukanov
8 class Nagvis_Widget
extends widget_Base
{
9 protected $duplicatable = true;
10 public function options() {
11 $maps = nagvisconfig
::get_map_list();
15 foreach (array_keys($maps) as $key) {
20 $tmp = array_values($maps);
23 # don't call parent, nagvis reloads itself
24 $map = new option('nagvis', 'map', 'Map', 'dropdown', array('options' => $maps), $default);
25 $height = new option('nagvis', 'height', 'Height (px)', 'input', array('size'=>3), 400);
26 $height->should_render_js(false);
27 return array($map, $height);
30 public function index() {
31 # fetch widget view path
32 $view_path = $this->view_path('view');
34 # set required extra resources
35 $this->js
= array('/js/nagvis');
37 $arguments = $this->get_arguments();
39 # fetch widget content