Override Core Controller By Package Is Not Working
Permalink 1 user found helpful
Hi community!
Here's situation :
Hi I'm trying to override by package like this :
public function on_start() {
$objEnv = Environment::get();
$objEnv->overrideCoreByPackage('single_pages/dashboard/users/search.php', $this);
$objEnv->overrideCoreByPackage('controllers/single_page/dashboard/users/search.php', $this);
}
For the file 'single pages' is working...but file 'controllers' it not working...Any ideas?
Your help is very much appreciated.
Here's situation :
Hi I'm trying to override by package like this :
public function on_start() {
$objEnv = Environment::get();
$objEnv->overrideCoreByPackage('single_pages/dashboard/users/search.php', $this);
$objEnv->overrideCoreByPackage('controllers/single_page/dashboard/users/search.php', $this);
}
For the file 'single pages' is working...but file 'controllers' it not working...Any ideas?
Your help is very much appreciated.
hi, what does your folder structure look like in your package?
Are your namespaces correct? Please post back if you work out what the issue is.
Are your namespaces correct? Please post back if you work out what the issue is.
Hi AndyJ,
I Copy from
'\concrete\controllers\single_page\dashboard\users\search.php'
to my folder structure package
'\packages\override_core\controllers\single_page\dashboard\users\search.php'.
in my packages (search.php) :-
I Copy from
'\concrete\controllers\single_page\dashboard\users\search.php'
to my folder structure package
'\packages\override_core\controllers\single_page\dashboard\users\search.php'.
in my packages (search.php) :-
namespace Packages\OverrideCore\Controllers\SinglePage\Dashboard\Users; use \Concrete\Core\Page\Controller\DashboardPageController; class Search extends DashboardPageController { public function mymethod() { } }
Hi,
how about if you change the namespace in the controller to:
*edited*
namespace Concrete\Package\OverrideCore\Controller\SinglePage\Dashboard\Users;
?
how about if you change the namespace in the controller to:
*edited*
namespace Concrete\Package\OverrideCore\Controller\SinglePage\Dashboard\Users;
?
it's still not working. Maybe i'm missing something?
sorry - I don't know. Did you try installing the package afresh?
After Re-Install my package is still not working.
Its ok Andy J. Thanks for helping me.
Its ok Andy J. Thanks for helping me.
I have never used this feature before, but would also be interested in the right way to use it.