}
}
+ public function getAdditionnalContent() {
+ $res = parent::getAdditionnalContent();
+ $res .= ' data-layer="' . $this->to . '"';
+ return $res;
+ }
+
public function getImageUrl() {
return 'data/links/layer_' . $this->uid . '.' . $this->_getExtension();
}
protected function _getExtension() {
- if ($this->_getLayer() === 'text' || $this->_getLayer() === 'onlytext') {
+ if ($this->_getLayer() === 'text' || $this->_getLayer() === 'onlytext' || $this->_getLayer() === 'bothsvg') {
return 'svg';
} else {
return 'jpg';
$extractOptions['quality'] = $attributes['quality'];
}
- if (isset($attributes['layer']) && !in_array($attributes['layer'], ['image', 'text', 'onlytext'])) {
+ if (isset($attributes['layer']) && !in_array($attributes['layer'], ['image', 'text', 'onlytext', 'bothsvg'])) {
unset($attributes['layer']);
}
$extractOptions['texts'] = true;
$extractOptions['background'] = false;
$ext = $extractOptions['format'] = 'svg';
+ } else if ($attributes['layer'] === 'bothsvg') {
+ $ext = $extractOptions['format'] = 'svg';
}
}