How to access function located in package controller?
Permalink
Hello,
excuse me if this was tackled before, but I just can't seem to find the answer...
I have a package and the following file: /packages/file_organizer/controllers/dashboard/file_organizer/organize.php
In the file I have the public function orgByType() which is working perfectly when triggered from the dashboard.
Then I've extended the members.php controller in /concrete/controllers and there I want to use the orgByType() function, so I tried all kinds of variations of:
$org = Loader::controller("packages/file_organizer/controllers/dashboard/file_organizer/organize");
$org->orgByType();
BUT nothing seems to work for me?
Any tips&tricks will be greatly appreciated...
Finally, if this is not possible should I move the orgByType() in a model within the package and then try to load the model instead?
Thank you in advance!
excuse me if this was tackled before, but I just can't seem to find the answer...
I have a package and the following file: /packages/file_organizer/controllers/dashboard/file_organizer/organize.php
In the file I have the public function orgByType() which is working perfectly when triggered from the dashboard.
Then I've extended the members.php controller in /concrete/controllers and there I want to use the orgByType() function, so I tried all kinds of variations of:
$org = Loader::controller("packages/file_organizer/controllers/dashboard/file_organizer/organize");
$org->orgByType();
BUT nothing seems to work for me?
Any tips&tricks will be greatly appreciated...
Finally, if this is not possible should I move the orgByType() in a model within the package and then try to load the model instead?
Thank you in advance!
Well, I had to put a few if-elses to figure out from where the actual load was triggered.
So, the code in project/controllers/members.php that is loading the function became this:
Hope, someday this gives a hint to somebody...