/** * Constructor. * * @param AbstractBundle $bundle * A AbstractBundle instance * @throws \InvalidArgumentException */ public function __construct(AbstractBundle $bundle) { $this->name = $bundle->getName(); $this->extensionName = $this->name; // for ExtensionVariablesTrait $this->variableApi = $bundle->getContainer()->get('zikula_extensions_module.api.variable'); // for ExtensionVariablesTrait $this->setTranslator($bundle->getContainer()->get('translator')); $this->translator->setDomain($bundle->getTranslationDomain()); $this->boot($bundle); }
/** * Constructor. * * @param AbstractBundle $bundle * A AbstractBundle instance * @throws \InvalidArgumentException */ public function __construct(AbstractBundle $bundle) { $this->name = $bundle->getName(); $this->translator = $bundle->getContainer()->get('translator'); $this->translator->setDomain($bundle->getTranslationDomain()); $this->boot($bundle); }