Answer the question
In order to leave comments, you need to log in
Why can a method in a native module fire twice?
Good day!
I started to cut my first module and immediately ran into the following problem:
When installing, I attach a function to the onAfterEpilog event
RegisterModuleDependences("main", "OnAfterEpilog", "modulname", "cMainClass", "AfterEpilog");
class cMainClass {
static $MODULE_ID = "modulname";
function AfterEpilog(){
echo "true";
}
}
<?php
CModule::IncludeModule("modulname");
global $DBType;
$arClasses = array(
'cMainClass '=>'classes/general/cMainClass .php'
);
CModule::AddAutoloadClasses("modulname", $arClasses);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question