namespace Fluidbook\Tools\Links;
+use Cubist\Util\Data;
+
class ZoomProductLink extends ZoomLink
{
+ protected static $_refs = null;
+
public function __construct($id, $init, &$compiler)
{
$init['group'] = $init['to'];
public function getZoomAttributes()
{
- $url = $this->compiler->getSetting('product_zoom_references.' . $this->to, '');
+ if (null === self::$_refs) {
+ /** @var Data $c */
+ $c = $this->compiler->config;
+ self::$_refs = $c->get('product_zoom_references');
+ }
+
+ $url = self::$_refs[$this->to] ?? '';
$res = parent::getZoomAttributes();
$res['maxzoom'] = $this->maxzoom_default;