X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FLegacyModule.php;h=53f76766044cde16a55f9d17ccd6bbc0f7d2b7d7;hb=ae99144f576cf349a0d6718d09af511df3576fb2;hp=77b35ba92c21803fcf14fa26a43593b29db74ccb;hpb=ce578a77453fd421e9598c994ef008ad7e128de6;p=friendica.git diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 77b35ba92c..53f7676604 100644 --- a/src/LegacyModule.php +++ b/src/LegacyModule.php @@ -21,8 +21,6 @@ namespace Friendica; -use Friendica\Core\L10n; - /** * This mock module enable class encapsulation of legacy global function modules. * After having provided the module file name, all the methods will behave like a normal Module class. @@ -39,13 +37,11 @@ class LegacyModule extends BaseModule */ private $moduleName = ''; - public function __construct(L10n $l10n, string $file_path = '', array $parameters = []) + public function __construct(string $file_path = '', array $parameters = []) { - parent::__construct($l10n, $parameters); + parent::__construct($parameters); $this->setModuleFile($file_path); - - $this->runModuleFunction('init'); } /** @@ -65,6 +61,11 @@ class LegacyModule extends BaseModule require_once $file_path; } + public function init() + { + $this->runModuleFunction('init'); + } + public function content(): string { return $this->runModuleFunction('content');