/** * * @param string $id * @param ajax_buffer $ajax_buf */ public function __construct($id, &$ajax_buf) { parent::__construct($id); $this->action = new ajax_entities_manager_action(); $this->_ajax_buf = $ajax_buf; $this->actionvar = new ajax_var($this->UID('actionvar'), ajax_entities_manager_action::NOACT); $this->itemvar = new ajax_var($this->UID('itemvar'), ''); $this->confirmvar = new ajax_var($this->UID('confirmvar'), false); $this->_ajax_buf->register_var($this->actionvar); $this->_ajax_buf->register_var($this->itemvar); $this->_ajax_buf->register_var($this->confirmvar); $this->_ajax_buf->addClientInitString($this->renderInits()); }
public function set_id($id) { if (!is_array(self::$ids)) { self::$ids = array(); } if (is_null($id)) { throw new Exception('The required parameter is not present: id'); } if (in_array($id, self::$ids)) { throw new Exception('Only one control with the id \'' . $id . '\' can be on the page'); } self::$ids[] = $id; $this->id = $id; }
/** * name: __construct * params: $page,$count */ public function __construct($id, $total, $pagesize = 10, $template = null) { parent::__construct($id); $this->pager = new pager($total, $pagesize); $page = isset($_REQUEST[$this->UID('page')]) ? $_REQUEST[$this->UID('page')] : 1; $this->pager->set_curpage($page); $this->pager->recalc(); if (is_null($template)) { $this->template = $this->_default_template; } else { $this->template = $template; } }
/** * Creates new ajax_var object * * @param string $id * @param string $value */ public function __construct($id, $value) { parent::__construct($id); $this->value = $value; }
public function __construct($id, $datasource = null, $header_template = null) { parent::__construct($id); $this->datasource = $datasource; $this->cache = new cacher(); if ($header_template != null) { $this->header_template = $header_template; } else { $this->header_template = $this->_default_header_template; } if (isset($_REQUEST[$this->get_sortby_param()])) { $this->_sorting = $_REQUEST[$this->get_sortby_param()]; } else { $this->_sorting = sorting::DEFAULT_SORT; } if (isset($_REQUEST[$this->get_sort_direction_param()])) { $this->_sort_dir = $_REQUEST[$this->get_sort_direction_param()]; } else { $this->_sort_dir = sorting::SORT_DIR_DEFAULT; } }
/** * Creates new ajax buffer * * @param string $id * @param bool $show_progress */ public function __construct($id, $show_progress = false) { parent::__construct($id); $rid = $this->client_id(); $this->is_post_back = isset($_REQUEST[$rid]); $this->show_progress = $show_progress; $this->postback_url = $_SERVER['REQUEST_URI']; $this->content = ''; ob_start(); }