protected static $_webvideoServicesMap = [0 => 'youtube', 1 => 'dailymotion', 2 => 'vimeo', 3 => 'brightcove', 'none' => 'youtube'];
+ protected static $_aliases = [Link::PAGE_LABEL => Link::ANCHOR];
+
/**
* @throws Exception
*/
protected static function _fixLinks(&$links)
{
+ self::_fixTypes($links);
self::_fixTooltips($links);
self::_correctImageSpecialLinks($links);
self::_fixWebVideoServices($links);
self::_fixCloseButton($links);
}
+ protected static function _fixTypes(&$links)
+ {
+ foreach ($links as $k => $link) {
+ if (isset(static::$_aliases[$link['type']])) {
+ $links[$k]['type'] = static::$_aliases[$link['type']];
+ }
+ }
+ }
+
protected static function _fixTooltips(&$links)
{
foreach ($links as $k => $link) {
['type' => \Fluidbook\Tools\Links\Link::STATSTAG, 'label' => __('Tag statistique'), 'color' => '#dddddd', 'class' => StatsTag::class],
['type' => \Fluidbook\Tools\Links\Link::PHONE, 'label' => __('Téléphone'), 'color' => '#333333', 'class' => Phone::class],
['type' => \Fluidbook\Tools\Links\Link::AUDIODESCRIPTION, 'label' => __('Audiodescription'), 'color' => '#00535b', 'class' => Audiodescription::class],
- ['type' => \Fluidbook\Tools\Links\Link::ANCHOR, 'label' => __('Ancre / Label de page'), 'color' => '#00E6D7', 'class' => Anchor::class, 'aliases' => \Fluidbook\Tools\Links\Link::PAGE_LABEL],
+ ['type' => \Fluidbook\Tools\Links\Link::ANCHOR, 'label' => __('Ancre / Label de page'), 'color' => '#00E6D7', 'class' => Anchor::class],
['type' => \Fluidbook\Tools\Links\Link::EVENT_OVERLAY, 'label' => __('Capter les évenements'), 'color' => '#ffcc00', 'class' => EventOverlay::class],
['type' => \Fluidbook\Tools\Links\Link::ARTICLE, 'label' => __('Article (définition)'), 'color' => '#ACC152', 'class' => Article::class],
['type' => \Fluidbook\Tools\Links\Link::LIKE, 'label' => __('Like'), 'color' => '#4267B2', 'class' => Like::class],