*/
public static function getInstance($id, $init, &$compiler)
{
+
$init = ArrayUtil::asArray($init);
static::normalizeDimensions($init);
$init['inline'] = 'background_texts';
return new VideoBackgroundLink($id, $init, $compiler);
}
+ break;
case static::CUSTOM:
return CustomLink::getCustomInstance($id, $init, $compiler);
case static::WEBVIDEO:
public static function getMultimediaInstance($id, $init, &$compiler)
{
+
if ($init['to'] == '') {
return null;
}
$init['inline'] = self::normalizeInlineIntegration($init['inline'] ?? '');
-
-
$ext = mb_strtolower(Files::getExtension($init['to']));
if (in_array($ext, array('oam', 'zip', 'html')) || substr($init['to'], 0, 4) == 'http') {
if (!is_numeric($this->page)) {
return false;
}
- return $this->top + $this->height <= 0 || $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page) || $this->left + $this->width <= 0;;
+ if ($this->width === '' || $this->height === '') {
+ return false;
+ }
+ return ($this->top + $this->height) <= 0 ||
+ ($this->left + $this->width <= 0) ||
+ $this->top > $this->compiler->getHeightForLinks($this->page) ||
+ $this->left > $this->compiler->getWidthForLinks($this->page);
}
public function ignore()