protected function RateDefaultWidget::load in Rate 7.2
Load the widget from database.
Set up the buttons, tag, value type etc.
Overrides RateWidget::load
File
- classes/
default.inc, line 25
Class
Code
protected function load() {
$widget = db_select('rate_widget', 'w')
->fields('w', array(
'wid',
'type',
'name',
'mode',
'sprites',
'highlight_voted',
'highlight_mouseover',
'desc_norating',
'desc_notvoted',
'desc_voted',
'desc_justvoted',
'desc_mouseover',
'css_file',
'js_file',
))
->condition('w.type', $this->type)
->execute()
->fetchObject();
if ($widget) {
$this->wid = $widget->wid;
$this->value_type = $widget->mode;
$this->css_file = $widget->css_file;
$this->js_file = $widget->js_file;
$this->desc_norating = $widget->desc_norating;
$this->desc_notvoted = $widget->desc_notvoted;
$this->desc_voted = $widget->desc_voted;
$this->desc_justvoted = $widget->desc_justvoted;
$this->desc_mouseover = $widget->desc_mouseover;
$this->sprites = (bool) $widget->sprites;
$this->highlight_voted = $widget->highlight_voted;
$this->highlight_mouseover = $widget->highlight_mouseover;
$this
->loadButtons();
}
}