const ANCHOR = 40;
const FLIPCARD = 41;
const PDF = 42;
+ const TEXT_POPUP = 43;
protected static string|false|null $_linksKey = null;
$init['to'] = self::replaceCustomURL($init['to']);
switch ($init['type']) {
- case 1:
- case 2:
+ case static::WEB:
+ case static::WEB_INFOS:
return new WebLink($id, $init, $compiler);
- case 3:
+ case static::EMAIL:
return new MailLink($id, $init, $compiler);
- case 5:
+ case static::INTERNAL:
return new InternalLink($id, $init, $compiler);
- case 4:
+ case static::VIDEO:
$init['inline'] = self::normalizeInlineIntegration($init['inline']);
if ($init['inline'] === 'inline') {
$init['inline'] = 'inline';
$init['inline'] = 'background_texts';
return new VideoBackgroundLink($id, $init, $compiler);
}
- case 7:
+ case static::CUSTOM:
return CustomLink::getCustomInstance($id, $init, $compiler);
- case 10:
+ case static::WEBVIDEO:
$init['inline'] = self::normalizeInlineIntegration($init['inline']);
if ($init['inline'] === 'popup') {
return new WebVideoPopupLink($id, $init, $compiler);
}
return new WebVideoLink($id, $init, $compiler);
- case 11:
+ case static::ACTION:
return new ActionLink($id, $init, $compiler);
- case 12: // Basket / Cart links
+ case static::CART: // Basket / Cart links
return new CartLink($id, $init, $compiler);
- case 13: // zoom area
+ case static::ZOOM: // zoom area
return new ZoomLink($id, $init, $compiler);
- case 14:
+ case static::COLOR:
return new ColorLink($id, $init, $compiler);
- case 15:
+ case static::IMAGE:
if (stristr($init['to'], '.zip')) {
return new InlineSlideshowLink($id, $init, $compiler);
}
return new ImageLink($id, $init, $compiler);
- case 16:
+ case static::FILE:
return new FileLink($id, $init, $compiler);
- case 17:
+ case static::AUDIO:
$init['inline'] = self::normalizeInlineIntegration($init['inline']);
if ($init['inline'] === 'inline') {
return new AudioLink($id, $init, $compiler);
}
return new AudioPopupLink($id, $init, $compiler);
- case 18:
- $init['inline'] = self::normalizeInlineIntegration($init['inline']);
- if ($init['inline'] === 'inline') {
- return new TooltipLink($id, $init, $compiler);
- }
+ case static::TOOLTIP:
+ return new TooltipLink($id, $init, $compiler);
+ case static::TEXT_POPUP:
return new TextPopupLink($id, $init, $compiler);
- case 20:
+ case static::BOOKMARKGROUP:
$compiler->addBookmarkGroup($init);
break;
- case 21:
- case 6:
+ case static::HTML5MULTIMEDIA:
+ case static::MULTIMEDIA:
return self::getMultimediaInstance($id, $init, $compiler);
- case 23:
+ case static::STATSTAG:
return new StatsTagLink($id, $init, $compiler);
- case 24:
+ case static::PHONE:
return new PhoneLink($id, $init, $compiler);
- case 25:
+ case static::AUDIODESCRIPTION:
$compiler->addAudiodescription($init);
break;
- case 26:
- case 40:
+ case static::PAGE_LABEL:
+ case static::ANCHOR:
return new AnchorLink($id, $init, $compiler);
- case 27:
+ case static::EVENT_OVERLAY:
return new EventOverlayLink($id, $init, $compiler);
- case 29:
+ case static::LIKE:
return new FacebookLikeLink($id, $init, $compiler);
- case 30:
+ case static::SLIDESHOW:
if (stristr($init['to'], '.zip')) {
$d = $compiler->unzipFile($init['to'], false, null, true);
if (Files::count($d['dir']) === 1) {
} else {
return new HTMLMultimediaPopupImage($id, $init, $compiler);
}
- case 31:
+ case static::IFRAME:
$init['inline'] = self::normalizeInlineIntegration($init['inline']);
if ($init['inline'] === 'inline') {
return new IFrameLink($id, $init, $compiler);
}
return new IFramePopupLink($id, $init, $compiler);
- case 32:
+ case static::SHOWLINK:
return new ShowLinkLink($id, $init, $compiler);
- case 33:
+ case static::ZOOMHD:
return new ZoomHDLink($id, $init, $compiler);
- case 34:
+ case static::LOCK_CONTENTS:
$compiler->addContentLock($init['page'], $init['to']);
break;
- case 35:
+ case static::TEXT:
return new TextLink($id, $init, $compiler);
- case 36:
+ case static::ARTICLE_OPEN:
if (stripos($init['to'], '.pdf') !== false) {
return new ArticlePDFLink($id, $init, $compiler);
} else {
return new ArticleLink($id, $init, $compiler);
}
- case 37:
+ case static::DOWNLOAD_PORTION:
return new DownloadPortionLink($id, $init, $compiler);
- case 38:
+ case static::TRIGGERSLINK:
if ($init['target'] != 'click') {
$extras = isset($init['extra']) ? self::parseExtras($init['extra']) : [];
return new TriggerLink($id, $init, $compiler);
}
break;
- case 39:
+ case static::LAYER:
return new LayerLink($id, $init, $compiler);
- case 41:
+ case static::FLIPCARD:
return new FlipcardLink($id, $init, $compiler);
- case 42:
+ case static::PDF:
return new PDFPopupLink($id, $init, $compiler);
default:
return null;