ctx || !dcCore::app()->ctx->exists('activityreports')) { return ''; } $group = dcCore::app()->ctx->__get('activityreports')->activity_group; $action = dcCore::app()->ctx->__get('activityreports')->activity_action; if (!ActivityReport::instance()->groups->get($group)->has($action)) { return ''; } return __(ActivityReport::instance()->groups->get($group)->get($action)->title); } /** * Parse content. * * @return string The parsed content */ public static function parseContent(): string { if (!dcCore::app()->ctx || !dcCore::app()->ctx->exists('activityreports')) { return ''; } $group = dcCore::app()->ctx->__get('activityreports')->activity_group; $action = dcCore::app()->ctx->__get('activityreports')->activity_action; $logs = json_decode((string) dcCore::app()->ctx->__get('activityreports')->activity_logs, true); if (!is_array($logs) || !ActivityReport::instance()->groups->get($group)->has($action)) { return ''; } dcCore::app()->initWikiComment(); return dcCore::app()->wikiTransform(vsprintf( __(ActivityReport::instance()->groups->get($group)->get($action)->message), $logs )); } }