Overriding/extending a Dashboard Helper


Overriding a core dashboard helper doesn't seem to work as expected. I'm trying to extend the core dashboard helper found in:


By placing a new helper file in:


And doing:

class SiteConcreteDashboardHelper extends ConcreteDashboardHelper

This errors out with:

Warning: require_once(/var/www/.../web/concrete/helpers/concrete_dashboard.php): failed to open stream: No such file or directory in /var/www/.../web/concrete/core/libraries/loader.php on line 293

For some reason C5 ignores its own CamelCase rules and looks for a concrete_dashboard.php instead of concrete/dashboard.php ? Am I doing anything wrong, or is it impossible to extend this core dashboard helper at the moment?

Thanks :o)

View Replies:
JohntheFish replied on at Permalink Reply
if you are in 5.6+, the way helper overrides work is a bit different and you need to extend the Concrete5_xxxx helper that the helper already extends.


(Though I have never tried that with the dashboard helper)
Hammertime replied on at Permalink Reply
Hi John,

I solved what I needed to do another way - but it seems like the C5 team hasn't added class stubs for the dashboard helpers like they've done with all the others - so the documented approach couldn't/didn't work in this case.

Thank you for your time, though :o)
jshannon replied on at Permalink Reply
So what's your approach, then???
sthaigh replied on at Permalink Reply
I got the same issue with the Text Helper, placing text.php inside [root]/helpers/ with the following code:

class TextHelper extends Concrete5_Helper_Text {
  public function someFunction() { }

I also tried
class SiteTextHelper extends Concrete5_Helper_Text {
  public function someFunction() { }

and ...

class SiteTextHelper extends HelperText {
  public function someFunction() { }

no dice... :-( So, I'm compelled to hack the core thus defeating the purpose of overrides in the first place. Double :-( :-(