Loader::helper('concrete/interface');
Permalink
In older blocks we could use the interface helper, like the Add Image button in the old slideshow block did.
This doesn't work anymore in 5.7. You get an error with the Loader::helper('concrete/interface') it says "Class helper/concrete/interface does not exist". Then with just the button_js line the form does not load at all.
Is that interface helper gone in 5.7 or what needs to be done to make it work?
thanks
$ah = Loader::helper('concrete/interface'); $ah->button_js(t('Add Image'), 'SlideshowBlock.chooseImg()', 'left')
This doesn't work anymore in 5.7. You get an error with the Loader::helper('concrete/interface') it says "Class helper/concrete/interface does not exist". Then with just the button_js line the form does not load at all.
Is that interface helper gone in 5.7 or what needs to be done to make it work?
thanks
I believe what you are looking for now is:
Or if you want to avoid calls to the [now deprecated] Loader class...
That said, the Loader class is still used in various places throughout the core, so I guess there's no big rush to adopt the new approach, but it should make your code a bit more future-proof.
-Steve
$ah = Core::make('helper/concrete/ui');
That said, the Loader class is still used in various places throughout the core, so I guess there's no big rush to adopt the new approach, but it should make your code a bit more future-proof.
-Steve
It worked!
it working not working on me
it errors on js
ReferenceError: ccm_launchFileManager is not defined
it errors on js
ReferenceError: ccm_launchFileManager is not defined