1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2022-02-05 08:56:07 +01:00
3 changed files with 215 additions and 0 deletions

View File

@@ -207,6 +207,37 @@ class php_exporter
return $rst_exporter->get_rst_output();
}
/**
* Format the PHP events as a BBCode list
*
* @param string $action
* @return string
*/
public function export_events_for_bbcode(string $action = ''): string
{
if ($action === 'diff')
{
$bbcode_text = '[size=150]PHP Events[/size]' . "\n";
}
else
{
$bbcode_text = '[size=200]PHP Events[/size]' . "\n";
}
foreach ($this->events as $event)
{
$bbcode_text .= "[list]\n";
$bbcode_text .= "[*][b]{$event['event']}[/b]\n";
$bbcode_text .= "Placement: {$event['file']}\n";
$bbcode_text .= 'Arguments: ' . implode(', ', $event['arguments']) . "\n";
$bbcode_text .= "Added in Release: {$event['since']}\n";
$bbcode_text .= "Explanation: {$event['description']}\n";
$bbcode_text .= "[/list]\n";
}
return $bbcode_text;
}
/**
* @param string $file
* @return int Number of events found in this file