@@ -17,19 +17,19 @@ class BbcodeToolbar extends BasePlugin
1717 public function run ()
1818 {
1919 // Add language files into javascript footer block
20- $ this -> feather -> hooks ->bind ('view.alter_data ' , [$ this , 'addLanguage ' ]);
20+ Container:: get ( ' hooks ' ) ->bind ('view.alter_data ' , [$ this , 'addLanguage ' ]);
2121 // Support default actions
22- $ this -> hooks ->bind ('controller.post.create ' , [$ this , 'addToolbar ' ]);
23- $ this -> hooks ->bind ('controller.post.edit ' , [$ this , 'addToolbar ' ]);
24- $ this -> hooks ->bind ('controller.topic.display ' , [$ this , 'addToolbar ' ]);
22+ Container:: get ( ' hooks ' ) ->bind ('controller.post.create ' , [$ this , 'addToolbar ' ]);
23+ Container:: get ( ' hooks ' ) ->bind ('controller.post.edit ' , [$ this , 'addToolbar ' ]);
24+ Container:: get ( ' hooks ' ) ->bind ('controller.topic.display ' , [$ this , 'addToolbar ' ]);
2525 // Support PMs plugin
26- $ this -> hooks ->bind ('conversationsPlugin.send.preview ' , [$ this , 'addToolbar ' ]);
27- $ this -> hooks ->bind ('conversationsPlugin.send.display ' , [$ this , 'addToolbar ' ]);
26+ Container:: get ( ' hooks ' ) ->bind ('conversationsPlugin.send.preview ' , [$ this , 'addToolbar ' ]);
27+ Container:: get ( ' hooks ' ) ->bind ('conversationsPlugin.send.display ' , [$ this , 'addToolbar ' ]);
2828 }
2929
3030 public function addLanguage ($ data )
3131 {
32- load_textdomain ('bbcode-toolbar ' , dirname (__FILE__ ).'/lang/ ' .$ this -> feather -> user ->language .'/bbeditor.mo ' );
32+ load_textdomain ('bbcode-toolbar ' , dirname (__FILE__ ).'/lang/ ' .Container:: get ( ' user ' ) ->language .'/bbeditor.mo ' );
3333 $ lang_bbeditor = array (
3434 'btnBold ' => __ ('btnBold ' , 'bbcode-toolbar ' ),
3535 'btnItalic ' => __ ('btnItalic ' , 'bbcode-toolbar ' ),
@@ -54,10 +54,10 @@ public function addLanguage($data)
5454
5555 public function addToolbar ()
5656 {
57- $ this -> feather -> template -> addAsset ('css ' , 'plugins/bbcode-toolbar/style/bbeditor.css ' , array ('type ' => 'text/css ' , 'rel ' => 'stylesheet ' ));
58- $ this -> feather -> template -> addAsset ('css ' , 'plugins/bbcode-toolbar/style/colorPicker.css ' , array ('type ' => 'text/css ' , 'rel ' => 'stylesheet ' ));
59- $ this -> feather -> template -> addAsset ('js ' , 'plugins/bbcode-toolbar/style/bbeditor.js ' , array ('type ' => 'text/javascript ' ));
60- $ this -> feather -> template -> addAsset ('js ' , 'plugins/bbcode-toolbar/style/colorPicker.js ' , array ('type ' => 'text/javascript ' ));
57+ View:: addAsset ('css ' , 'plugins/bbcode-toolbar/style/bbeditor.css ' , array ('type ' => 'text/css ' , 'rel ' => 'stylesheet ' ));
58+ View:: addAsset ('css ' , 'plugins/bbcode-toolbar/style/colorPicker.css ' , array ('type ' => 'text/css ' , 'rel ' => 'stylesheet ' ));
59+ View:: addAsset ('js ' , 'plugins/bbcode-toolbar/style/bbeditor.js ' , array ('type ' => 'text/javascript ' ));
60+ View:: addAsset ('js ' , 'plugins/bbcode-toolbar/style/colorPicker.js ' , array ('type ' => 'text/javascript ' ));
6161 return true ;
6262 }
6363
0 commit comments