params['tree']))
->embed(
$content,
$this->file,
function ($src, array $attributes, Raw $file) {
$filename = basename($file->getPath());
//Add the attachment for later upload
$this->attachments[$filename] = ['filename' => $filename, 'file' => $file];
return $this->createImageTag($filename, $attributes);
}
);
$intro = '';
if (array_key_exists('confluence', $this->params) && array_key_exists('header', $this->params['confluence']) && !empty($this->params['confluence']['header'])) {
$intro = '' . $this->params['confluence']['header'] . '';
}
return $intro . $content;
}
private function createImageTag($filename, $attributes)
{
$img = ' $value) {
$img .= ' ac:' . $name . '="' . htmlentities($value, ENT_QUOTES, 'UTF-8', false) . '"';
}
$img .= ">";
return $img;
}
}