protected function isEventHandlerCodeValid($eventHandlerName) { $reflection = new \ReflectionClass('\\Bitrix24\\Presets\\Event\\Event'); $result = $reflection->getConstant(strtoupper($eventHandlerName)); return isset($result); }