class myClass {
static $module_id = "modulename";
public function import()
{
$arResult = array();
$arData = array(
'result1',
'result2',
'result3',
);
foreach($arData AS $v)
{
$arResult[] = 'Строка: '.$v;
}
$rsHandlers = GetModuleEvents(self::$module_id, "MyNameEvent");
while($arHandler = $rsHandlers->Fetch())
{
$arResult = ExecuteModuleEvent($arHandler, $arResult));
}
return $arResult;
}
}
AddEventHandler("modulename", "MyNameEvent", "MyFnCall");
function MyFnCall($arData = array())
{
$arResult = array();
foreach($arData AS $v)
{
$arResult[] = $v.' что то изменили';
}
return $arResult;
}