How to get Assets url for a custom created plugin for redactor editor Yii 1.xx
buttflattery opened this issue · 1 comments
i am making a plugin (File Manager) for redactorJs and i have some custom view files and a controller that are used inside the plugin, inside those view files i have to reference some js
and css
files from that plugin directory, i have placed my plugin inside the extensions/booster/assets/redator/plugins/my_plugin
, now when yii initializes booster it copies all assets to the web assets directory means to the assets folder insid my project root, i need to get that path that it creates with the random directory name, can any one guide me how can i get that. i tried using Yii:import('application.extensions.booster.components.Booster');
and then trying to access Booster::_assetsUrl
but it says
Fatal error: Undefined class constant '_assetsUrl'
Sorry , I needed to use Yii::app()->booster->getAssetsUrl()
to access the published assets url