1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/13713] Add mention BBCode

PHPBB3-13713
This commit is contained in:
lavigor
2018-05-30 21:58:28 +03:00
committed by Marc Alexander
parent 41b1b32e29
commit 6c42563b4d
6 changed files with 51 additions and 0 deletions

View File

@@ -28,6 +28,11 @@ class renderer implements \phpbb\textformatter\renderer_interface
*/
protected $dispatcher;
/**
* @var mention_helper
*/
protected $mention_helper;
/**
* @var quote_helper
*/
@@ -117,6 +122,16 @@ class renderer implements \phpbb\textformatter\renderer_interface
extract($dispatcher->trigger_event('core.text_formatter_s9e_renderer_setup', compact($vars)));
}
/**
* Configure the mention_helper object used to display extended information in mentions
*
* @param mention_helper $mention_helper
*/
public function configure_mention_helper(mention_helper $mention_helper)
{
$this->mention_helper = $mention_helper;
}
/**
* Configure the quote_helper object used to display extended information in quotes
*
@@ -229,6 +244,11 @@ class renderer implements \phpbb\textformatter\renderer_interface
*/
public function render($xml)
{
if (isset($this->mention_helper))
{
$xml = $this->mention_helper->inject_metadata($xml);
}
if (isset($this->quote_helper))
{
$xml = $this->quote_helper->inject_metadata($xml);