From 753435f31c3647d1d2e44c579f6193ba7b3008e6 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 23 Feb 2026 11:08:06 +0100 Subject: [PATCH] wip #7913 @0:30 --- src/Links/AltTextImageLink.php | 17 +++++++++++------ src/Links/Link.php | 4 ++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Links/AltTextImageLink.php b/src/Links/AltTextImageLink.php index b094806..e5509dd 100644 --- a/src/Links/AltTextImageLink.php +++ b/src/Links/AltTextImageLink.php @@ -7,22 +7,27 @@ class AltTextImageLink extends Link { public function getAdditionnalContent() : string { $res = parent::getAdditionnalContent(); + $res .= ' data-text="' . htmlspecialchars($this->to, ENT_QUOTES) . '" '; + $res .= ' data-icon-x="' . $this->icon_x . '" data-icon-y="' . $this->icon_y . '"'; + return $res; } public function getInnerContent() : string { + $attrs = $this->getTooltipAttribute($this->to); + return '
'; + } + + public function getHTMLContent() : string + { $class = $this->getClasses(); $attrs = ''; + if (count($class)) { $attrs .= ' class="' . implode(' ', $class) . '"'; } - $attrs .= $this->getTooltipAttribute($this->to); - return 'getAdditionnalContent() . '>'; - } - public function getHTMLContent() : string - { - return '
'.$this->getInnerContent(); + return 'getAdditionnalContent() . '>' . $this->getInnerContent() . ''; } } diff --git a/src/Links/Link.php b/src/Links/Link.php index 4b336ca..ded1f5a 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -178,6 +178,10 @@ class Link public $attachLeft = false; + public $icon_x = 100; + + public $icon_y = 100; + protected static $_encryptedTypes = [14, 15, 35, 39]; protected static $_encryptedAttributes = ['image_rollover']; -- 2.39.5