Welcome Guest, Not a member yet? Register   Sign In
can I override or add config files in my ThirdParty/package?
#1

(This post was last modified: 02-29-2020, 05:12 AM by midav.)

Good day, can I redefine the config files in my package, for example, I want to add the Filters.php config file so that I can create it in my app / ThirdParty / lebid / Config / Filters.php package and just add it.

I just want to make for myself a mini CMS, and when I installed the framework, just drop my CMS package into the ThirdParty folder and start working so that I don’t do the settings in app / Config, so that I can do all the settings in my package, such as ( Autoload.php, Filters.php, Toolbar.php, Validation.php)
Reply
#2

You can do that but Config files in App will always take precedence, so you would need to (re)move them. You might also want to look into Registrars, which might account for some of the behavior you are after: https://codeigniter4.github.io/userguide...registrars
Reply
#3

(03-01-2020, 08:37 AM)MGatner Wrote: You can do that but Config files in App will always take precedence, so you would need to (re)move them. You might also want to look into Registrars, which might account for some of the behavior you are after: https://codeigniter4.github.io/userguide...registrars
so I want to do this so that I drop 3 packages into the ThirdParty folder (lebid, myth-auth, smarty) and everything works right away so that I don’t get into any other config files (Autoload.php, Filters.php, Toolbar.php, Validation .php) on the base installation. To configure the necessary config in my package, that's all.
Reply
#4

(This post was last modified: 03-01-2020, 11:05 AM by midav.)

I tried the registrar, and it gets to redistribute the necessary config to me, for example, add app/Config/Filters.php add
public static $registrars = [
    '\CMS\Config\MyFilters'
];
and then it works, and if you need to reassign several configs, then you need to go into each one and substitute it. somehow it is possible for example to create my Kong for example app/Config/CMS.php and in it to specify all the config files that I want to redistribute?
Reply
#5

You would also need the email config file because Myth::Auth use it also.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(This post was last modified: 03-02-2020, 11:31 AM by midav.)

(03-02-2020, 08:59 AM)InsiteFX Wrote: You would also need the email config file because Myth::Auth use it also.
I know this, I wonder if it is possible to do so as I wrote above.

or I think to do everything in APP and use to expand my mini CMS. https://codeigniter4.github.io/userguide...dules.html

And when someone gives my mini CMS, they will need to fill in the APP folder and the module folder

And when I do a new project I will need to fill in the APP folder and the modules folder
Reply




Theme © iAndrew 2016 - Forum software by © MyBB