Hello,
I started implementing a ui plugin and realized that perhaps it should actually be a widget? Does anyone have examples of a widget? Do I subclass RaxanUIWidget and respond to events similar to RaxanPlugin?
Thanks
I started implementing a ui plugin and realized that perhaps it should actually be a widget? Does anyone have examples of a widget? Do I subclass RaxanUIWidget and respond to events similar to RaxanPlugin?
class HelloWidget extends RaxanUIWidget {
protected function _config(){
// optional - do something here
}
protected function _init(){
// optional - do something here
}
protected function _load(){
// optional - do something here
}
protected function _prerender(){
// code to render widget UI
$this->html('Hello World!');
}
}
$widget = new HelloWidget();
$this->append($widget); // append to document
<div xt-ui="HelloWidget"></div>
$w = new Widget('id1'); // Use an existing element with id1
$w = new Widget('id2'); // Create a new element with id2
$w = new Widget($element); // DOMElement
Users browsing this forum: No registered users and 1 guest