aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter/s9e/factory.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/factory.php')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 736f9a9f8a..7fdc5afeed 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -23,9 +23,9 @@ use s9e\TextFormatter\Configurator\Items\UnsafeTemplate;
class factory implements \phpbb\textformatter\cache_interface
{
/**
- * @var \phpbb\textformatter\s9e\autolink_helper
+ * @var \phpbb\textformatter\s9e\link_helper
*/
- protected $autolink_helper;
+ protected $link_helper;
/**
* @var \phpbb\cache\driver\driver_interface
@@ -138,14 +138,14 @@ class factory implements \phpbb\textformatter\cache_interface
* @param \phpbb\cache\driver\driver_interface $cache
* @param \phpbb\event\dispatcher_interface $dispatcher
* @param \phpbb\config\config $config
- * @param \phpbb\textformatter\s9e\autolink_helper $autolink_helper
+ * @param \phpbb\textformatter\s9e\link_helper $link_helper
* @param string $cache_dir Path to the cache dir
* @param string $cache_key_parser Cache key used for the parser
* @param string $cache_key_renderer Cache key used for the renderer
*/
- public function __construct(\phpbb\textformatter\data_access $data_access, \phpbb\cache\driver\driver_interface $cache, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\textformatter\s9e\autolink_helper $autolink_helper, $cache_dir, $cache_key_parser, $cache_key_renderer)
+ public function __construct(\phpbb\textformatter\data_access $data_access, \phpbb\cache\driver\driver_interface $cache, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\textformatter\s9e\link_helper $link_helper, $cache_dir, $cache_key_parser, $cache_key_renderer)
{
- $this->autolink_helper = $autolink_helper;
+ $this->link_helper = $link_helper;
$this->cache = $cache;
$this->cache_dir = $cache_dir;
$this->cache_key_parser = $cache_key_parser;
@@ -414,29 +414,28 @@ class factory implements \phpbb\textformatter\cache_interface
// Add a tag filter that creates a tag that stores and replace the
// content of a link created by the Autolink plugin
$configurator->Autolink->getTag()->filterChain
- ->add(array($this->autolink_helper, 'generate_autolink_text_tag'))
+ ->add(array($this->link_helper, 'generate_link_text_tag'))
->resetParameters()
->addParameterByName('tag')
->addParameterByName('parser');
// Create a tag that will be used to display the truncated text by
// replacing the original content with the content of the @text attribute
- $tag = $configurator->tags->add('AUTOLINK_TEXT');
+ $tag = $configurator->tags->add('LINK_TEXT');
$tag->attributes->add('text');
- $tag->attributes->add('url', array('required' => false))->filterChain->add('#url');
$tag->template = '<xsl:value-of select="@text"/>';
$tag->filterChain
- ->add(array($this->autolink_helper, 'truncate_local_url'))
+ ->add(array($this->link_helper, 'truncate_local_url'))
->resetParameters()
->addParameterByName('tag')
->addParameterByValue(generate_board_url() . '/');
$tag->filterChain
- ->add(array($this->autolink_helper, 'truncate_text'))
+ ->add(array($this->link_helper, 'truncate_text'))
->resetParameters()
->addParameterByName('tag');
$tag->filterChain
- ->add(array($this->autolink_helper, 'cleanup_tag'))
+ ->add(array($this->link_helper, 'cleanup_tag'))
->resetParameters()
->addParameterByName('tag')
->addParameterByName('parser');