mirror of https://github.com/joomla/joomla-cms.git
Allow module without Helper/HelperFactory (#40017)
This commit is contained in:
parent
15dfdfb45f
commit
e1c9bf3d9c
|
@ -53,7 +53,7 @@ class Module implements ModuleInterface, HelperFactoryInterface
|
|||
*
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public function __construct(ModuleDispatcherFactoryInterface $dispatcherFactory, HelperFactoryInterface $helperFactory)
|
||||
public function __construct(ModuleDispatcherFactoryInterface $dispatcherFactory, ?HelperFactoryInterface $helperFactory)
|
||||
{
|
||||
$this->dispatcherFactory = $dispatcherFactory;
|
||||
$this->helperFactory = $helperFactory;
|
||||
|
|
|
@ -42,7 +42,7 @@ class Module implements ServiceProviderInterface
|
|||
function (Container $container) {
|
||||
return new \Joomla\CMS\Extension\Module(
|
||||
$container->get(ModuleDispatcherFactoryInterface::class),
|
||||
$container->get(HelperFactoryInterface::class)
|
||||
$container->has(HelperFactoryInterface::class) ? $container->get(HelperFactoryInterface::class) : null
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue