Extensions with or without admin controller

Discussion forum for Extension Writers regarding Extension Development.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions with or without admin controller

Post by 3Di »

GanstaZ wrote: Sun Jan 23, 2022 8:36 pm meant module classes where constructor injection doesn't work at the moment
Example please?
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Extensions with or without admin controller

Post by GanstaZ »

Code: Select all

public function main(): void
{
	global $phpbb_container;

	/** @var \some $controller */
	$controller = $phpbb_container->get('some.controller');
}
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions with or without admin controller

Post by 3Di »

Ah, I see.. that's indeed a necessary evil for now. Indeed.
3Di wrote: Sun Jan 23, 2022 7:32 pm If you are using a controller for ACP then the module should be kept as basic as it is, use the controller for all of your needs. Or an helper class.
That's the minimum.
Example: https://github.com/phpBB-Studio/VideoBl ... module.php
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Extensions with or without admin controller

Post by GanstaZ »

Yeah,.. but hopefully it will be changed soon & then injection can be used the right way)
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Extensions with or without admin controller

Post by 3Di »

Hopefully.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “Extension Writers Discussion”