public function render($variables = array()) { $attributes = array(); foreach ((array) $this->template_variables['attributes'] as $key => $value) { $attributes[] = sprintf('%s="%s"', htmlReady($key), htmlReady($value)); } $this->template_variables['attributes'] = implode(' ', $attributes) ?: ''; return parent::render($variables); }
/** * Renders the widget. * * @param Array $variables Unused variables parameter * @return String containing the html output of the widget */ public function render($variables = array()) { $query = parse_url($this->url, PHP_URL_QUERY); if ($query) { $this->url = str_replace('?' . $query, '', $this->url); parse_str(html_entity_decode($query) ?: '', $query_params); } else { $query_params = array(); } $this->template_variables['url'] = URLHelper::getLink($this->url); $this->template_variables['url_params'] = $query_params; $this->template_variables['method'] = $this->method; $this->template_variables['id'] = $this->id; foreach ($this->needles as $index => $needle) { if ($needle['quick_search']) { $quick_search = QuickSearch::get($needle['name'], $needle['quick_search']); if ($needle['js_func'] !== null) { $quick_search->fireJSFunctionOnSelect($needle['js_func']); } $needle['quick_search'] = $quick_search; $this->needles[$index] = $needle; } } if ($this->hasData()) { $reset_link = sprintf('<a href="%s">%s %s</a>', URLHelper::getLink($this->template_variables['url'], array('reset-search' => 1)), Icon::create('search+decline', 'clickable')->asImg(["class" => 'text-top']), _('Zurücksetzen')); $this->template_variables['reset_search'] = $reset_link; } $this->template_variables['needles'] = $this->needles; $this->template_variables['filters'] = $this->filters; $this->template_variables['has_data'] = $this->hasData(); return parent::render($variables); }
/** * */ public function render($variables = array()) { $this->template_variables['css_classes'] = $this->css_classes; return parent::render($variables); }