--- /dev/null
+<?php
+
+namespace App\Fluidbook\Link\Cart;
+
+use Fluidbook\Tools\Links\CartLink;
+
+class PumaCartLink extends cartLink
+{
+ public function getInnerContent()
+ {
+ return '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#B09474;}
+ .st1{fill:#FFFFFF;}
+ .st2{opacity:0.5;fill:#B09474;enable-background:new;}
+</style>
+<g class="on">
+ <circle class="st0" cx="16" cy="16" r="14"/>
+ <path class="st1" d="M16,23.2c-0.2,0-0.4-0.1-0.5-0.2L10,17.4c-1.2-1.2-1.5-3-0.7-4.4c1-1.9,3.4-2.7,5.3-1.7c0.4,0.2,0.7,0.4,1,0.7
+ l0.4,0.4l0.4-0.4c1.5-1.5,4-1.5,5.6,0c0.3,0.3,0.6,0.6,0.7,1c0.8,1.5,0.5,3.3-0.7,4.5l-5.5,5.5C16.4,23.1,16.2,23.2,16,23.2z"/>
+</g>
+<g class="off">
+ <circle class="st2" cx="16" cy="16" r="14"/>
+ <path class="st1" d="M16,23.2c-0.2,0-0.4-0.1-0.5-0.2L10,17.4c-1.2-1.2-1.5-3-0.7-4.4c1-1.9,3.4-2.7,5.3-1.7c0.4,0.2,0.7,0.4,1,0.7
+ l0.4,0.4l0.4-0.4c1.5-1.5,4-1.5,5.6,0c0.3,0.3,0.6,0.6,0.7,1c0.8,1.5,0.5,3.3-0.7,4.5l-5.5,5.5C16.4,23.1,16.2,23.2,16,23.2z
+ M12.8,12.3c-0.9,0-1.8,0.5-2.3,1.4c-0.5,0.9-0.3,2.1,0.5,2.8l5,5l5-5c0.8-0.7,1-1.9,0.5-2.8c-0.1-0.2-0.3-0.4-0.5-0.6
+ c-1-1-2.6-1-3.6,0l-0.9,0.9c-0.3,0.3-0.7,0.3-1,0L14.6,13c-0.2-0.2-0.4-0.3-0.7-0.5C13.6,12.3,13.2,12.3,12.8,12.3z"/>
+</g>
+</svg>';
+ }
+
+ public function getAdditionnalContent()
+ {
+ $res = parent::getAdditionnalContent();
+ $res .= ' data-tooltip-conditional="' . htmlspecialchars(json_encode(['.active' => 'remove from cart'])) . '" ';
+ return $res;
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fluidbook\Link\Custom;
+
+class IntexLink extends CustomLink
+{
+ public static function _getURL($to)
+ {
+ return self::_getURLOfType('intex', $to);
+ }
+
+ public function getDefaultTooltip()
+ {
+ return 'Cliquer pour voir la page du produit';
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Fluidbook\Link;
+
+use App\Fluidbook\Link\Cart\PumaCartLink;
+use Cubist\Util\ArrayUtil;
+use Fluidbook\Tools\Links\CartLink;
+use Fluidbook\Tools\Links\CustomLink;
+use Fluidbook\Tools\Links\ZoomProductLink;
+
+class Link extends \Fluidbook\Tools\Links\Link
+{
+ public static function getInstance($id, $init, &$compiler)
+ {
+ $init = ArrayUtil::asArray($init);
+
+ $init['scorm'] = self::isScorm($init);
+ $init['to'] = self::replaceCustomURL($init['to']);
+
+ switch ($init['type']) {
+ case 7:
+ if ($compiler->book->parametres->basketManager === 'Puma') {
+ return new PumaCartLink($id, $init, $compiler);
+ }
+ if ($compiler->book->parametres->basketManager === 'MIF') {
+ return new CartLink($id, $init, $compiler);
+ }
+ switch ($compiler->book->parametres->customLinkClass) {
+ case 'IntexLink':
+ return new intexLink($id, $init, $compiler);
+ case 'WescoLink':
+ return new wescoLink($id, $init, $compiler);
+ case 'HaguenauManifLink':
+ return new haguenauManifLink($id, $init, $compiler);
+ case 'FLFLink':
+ return new flfLink($id, $init, $compiler);
+ case 'InpesPopinLink':
+ return new inpesPopinLink($id, $init, $compiler);
+ case 'PierronLink':
+ return new pierronLink($id, $init, $compiler);
+ case 'WescoSalesLink':
+ return new wescoSalesLink($id, $init, $compiler);
+ case 'AtlanticDownloadLink':
+ return new atlanticDownloadLink($id, $init, $compiler);
+ case 'MiraklEaster2021':
+ return new miraklEaster2021Link($id, $init, $compiler);
+ default :
+ break;
+ }
+ case 12: // Basket / Cart links
+ if ($compiler->book->parametres->product_zoom_references !== '') {
+ return new zoomProductLink($id, $init, $compiler);
+ }
+ switch ($compiler->book->parametres->basketManager) {
+ case 'Bastide':
+ return new BastideCartLink($id, $init, $compiler);
+ case 'CFOC':
+ return new CFOCCartLink($id, $init, $compiler);
+ case 'GrandVision':
+ return new grandVisionCartLink($id, $init, $compiler);
+ case 'GrandPavois':
+ return new grandPavoisCartLink($id, $init, $compiler);
+ case 'JoueclubWishlist2021':
+ return new joueclub2021CartLink($id, $init, $compiler);
+ case 'JoueclubWishlist':
+ return new JoueclubWishlistLink($id, $init, $compiler);
+ case 'Remarkable':
+ return new remarkableCartLink($id, $init, $compiler);
+ case 'ZoomProductLink':
+ case 'Flexipan':
+ case 'Puma':
+ case 'MIF':
+ return new ZoomProductLink($id, $init, $compiler);
+ default :
+ break;
+ }
+ default:
+ break;
+ }
+ return parent::getInstance($id, $init, $compiler);
+ }
+}
use DOMDocument;
use DOMElement;
use DOMXPath;
+use Fluidbook\Tools\Links\AnchorLink;
+use Fluidbook\Tools\Links\ContentLink;
+use App\Fluidbook\Link\Link;
use Illuminate\Console\Command;
use SimpleXMLElement;
public function writeJoueClub2021Cart()
{
$this->lessVariables['import-cart-styles'] = 'joueclub2021';
- $extra = wsHTML5Link::parseExtras($this->fluidbookSettings->cartExtraSettings, true);
+ $extra = Link::parseExtras($this->fluidbookSettings->cartExtraSettings, true);
/**
* buttonColor=#d7b646
// It's possible to use the cartExtraSettings field in the parameters to define publication specific settings,
// such as the subject line used in the e-mail that is sent from the cart validation
- $extra = wsHTML5Link::parseExtras($this->fluidbookSettings->cartExtraSettings, true);
+ $extra = Link::parseExtras($this->fluidbookSettings->cartExtraSettings, true);
$this->config->cartEmailSubject = $extra['email_subject'] ?? 'Récapitulatif de votre commande CFOC';
}
$links[$k] = $linkData;
}
if ($linkData['type'] == 26 || $linkData == 40) {
- $linkData['to'] = anchorLink::normalizeAnchor($linkData['to']);
+ $linkData['to'] = AnchorLink::normalizeAnchor($linkData['to']);
$anchorExists[$linkData['to']] = $linkData;
}
if ($linkData['type'] == 35 || $linkData['type'] == 15 || $linkData['type'] == 39) {
$linkData = FluidbookLinks::decryptLink($linkData);
- $animations = contentLink::parseAnimations($linkData['image_rollover']);
+ $animations = ContentLink::parseAnimations($linkData['image_rollover']);
foreach ($animations as $animation) {
if (isset($animation['backgroundcolor']) && $animation['backgroundcolor'] !== 'transparent') {
$dupData = $linkData;
$dupData['image_rollover'] = '';
$dupData['type'] = 15;
$dupData['uid'] = 'i_' . $linkData['uid'];
- if (wsHTML5Link::isScorm($linkData)) {
+ if (Link::isScorm($linkData)) {
$dupData['scorm'] = true;
}
array_push($links, $dupData);
$dupData['type'] = 6;
$linkData['relatedAnimation'] = $dupData['uid'] = 'a_' . $linkData['uid'];
$dupData['video_width'] = $dupData['video_height'] = 0;
- if (wsHTML5Link::isScorm($linkData)) {
+ if (Link::isScorm($linkData)) {
$dupData['scorm'] = true;
}
$links[$k] = $linkData;
$lines = Text::explodeNewLines(file_get_contents($this->fluidbookSettings->anchorsAliases));
foreach ($lines as $line) {
$e = explode("\t", $line);
- $from = anchorLink::normalizeAnchor($e[0]);
- $to = anchorLink::normalizeAnchor($e[1]);
+ $from = AnchorLink::normalizeAnchor($e[0]);
+ $to = AnchorLink::normalizeAnchor($e[1]);
$aliases[$from] = $to;
if (is_numeric($to) && !isset($anchorExists[$from])) {
$anchor = [
'height' => 100,
'type' => 26,
'to' => $from,
- 'uid' => wsHTML5Link::generateUID()
+ 'uid' => Link::generateUID()
];
$anchorExists[$from] = $anchor;
$links[] = $anchor;
if (!isset($anchorExists[$from]) && isset($anchorExists[$to])) {
$anchor = $anchorExists[$to];
$anchor['to'] = $from;
- $anchor['uid'] = wsHTML5Link::generateUID();
+ $anchor['uid'] = Link::generateUID();
$anchorExists[$from] = $anchor;
$links[] = $anchor;
}
continue;
}
- $link = wsHTML5Link::getInstance($this->base62($i), $linkData, $this);
+ $link = Link::getInstance($this->base62($i), $linkData, $this);
if (is_null($link) || $link->ignore()) {
continue;
}
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
+ "ext-sodium": "*",
"ext-tidy": "*",
"ext-zip": "*",
"ext-zlib": "*",
- "ext-sodium": "*",
"ahmadshah/lucy": "dev-master",
"cubedesigners/userdatabase": "dev-master",
"cubist/azuretts": "dev-master",
"cubist/pdf": "dev-master",
"cubist/scorm": "dev-master",
"fluidbook/tools": "dev-master",
+ "jolicode/slack-php-api": "^v4.5",
"league/csv": "^9.8",
"mxl/laravel-job": "^1.3",
"nyholm/psr7": "^1.5",
"php-ffmpeg/php-ffmpeg": "^0.18.0",
"phpoffice/phpspreadsheet": "^1.22",
- "jolicode/slack-php-api": "^v4.5",
"rustici-software/scormcloud-api-v2-client-php": "^2.0",
"symfony/http-client": "^v6.0"
},
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fff097437e6034c90b33c9861db5b39a",
+ "content-hash": "6bf7dc70ab8577e11a99bba012989f5e",
"packages": [
{
"name": "ahmadshah/lucy",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
+ "ext-sodium": "*",
"ext-tidy": "*",
- "ext-zip": "*"
+ "ext-zip": "*",
+ "ext-zlib": "*"
},
"platform-dev": [],
"plugin-api-version": "2.1.0"