Skip to content
Code-Schnipsel Gruppen Projekte

feat(ArticleListUnique): toHTML() can be passed to template engine and thus...

Zusammengeführt Henning Leutz requested to merge next-3.x into main
1 Datei
+ 9
12
Änderungen vergleichen
  • Nebeneinander
  • In der Reihe
@@ -388,17 +388,17 @@ public function setExchangeRate(float $rate): void
@@ -388,17 +388,17 @@ public function setExchangeRate(float $rate): void
/**
/**
* Return the Article List as HTML, without CSS
* Return the Article List as HTML, without CSS
*
*
* @param bool|string $template - custom template
* @param bool|string $articleTemplate
* @return string
*
* @throws Exception
* @throws Exception
*/
*/
public function toHTML(
public function toHTML(
bool|string $template = false,
bool|string $template = false,
bool|string $articleTemplate = false
bool|string $articleTemplate = false,
 
?QUI\Interfaces\Template\EngineInterface $Engine = null
): string {
): string {
$Engine = QUI::getTemplateManager()->getEngine();
if ($Engine === null) {
 
$Engine = QUI::getTemplateManager()->getEngine();
 
}
 
$vatArray = [];
$vatArray = [];
if (!$this->count()) {
if (!$this->count()) {
@@ -551,21 +551,18 @@ public function toMailHTML(): string
@@ -551,21 +551,18 @@ public function toMailHTML(): string
/**
/**
* Return the Article List as HTML, with CSS
* Return the Article List as HTML, with CSS
*
*
* @param bool|string $template
* @param bool|string $articleTemplate
* @return string
*
* @throws Exception
* @throws Exception
*/
*/
public function toHTMLWithCSS(
public function toHTMLWithCSS(
bool|string $template = false,
bool|string $template = false,
bool|string $articleTemplate = false
bool|string $articleTemplate = false,
 
?QUI\Interfaces\Template\EngineInterface $Engine = null
): string {
): string {
$style = '<style>';
$style = '<style>';
$style .= file_get_contents(dirname(__FILE__) . '/ArticleList.css');
$style .= file_get_contents(dirname(__FILE__) . '/ArticleList.css');
$style .= '</style>';
$style .= '</style>';
return $style . $this->toHTML($template, $articleTemplate);
return $style . $this->toHTML($template, $articleTemplate, $Engine);
}
}
/**
/**
Lade