BsWidget::registerEvents doesn't work
Issue #24
resolved
BsWidget::registerEvents doesn't work if you haven't a component 'bootstrap' as an instance of TbApi (??).
A missing dependency here?
Comments (7)
-
repo owner -
repo owner -
assigned issue to
-
assigned issue to
-
reporter Well I was trying to create modal a with the 'BsModal' widget class, but I've realized that it doesn't register the 'onShow' event callback, so I debug it and I found this/
// /Behaviors/BsWidget.php /** * Returns the API instance. * @return TbApi the api. */ private function getApi() { if (isset($this->_api)) { return $this->_api; } else { return $this->_api = Yii::app()->getComponent('bootstrap'); } }
As you can see it expects a component with ID 'bootstrap', and as the method comments saying it should be an instance og TbApi, no?
-
repo owner - changed status to resolved
resolve
#24add registerEvents→ <<cset 3d0d7fc298a7>>
-
repo owner plz let me know that works for you
-
reporter It seems to work now. thanks BUT it seems that is missing the BsApi::registerPlugin() too.
-
repo owner is added
- Log in to comment
BsWidget doesn't exist what do you wanna do ?