XF 2.0 I would like to know if it's the right way to create an import

XenConcept

Formerly Rémi C
#1
here is an example :

PHP:
public static function importerTest(\XF\SubContainer\Import $container, \XF\Container $parentContainer, array &$importers)
    {
        $importers[] = 'Test:Test';
    }
Could you explain to me what is the purpose of this parameter ?

Code:
\XF\SubContainer\Import $container
Thanks you
 

XenConcept

Formerly Rémi C
#3
That's the right way to add an importer, yes.


It's a sub-container of the root dependency injection container. You could add things to it, or use it to get the import manager if you needed to for whatever reason.
Thank you I'm going to look at her more closely
 
Top