Skip to content
Code-Schnipsel Gruppen Projekte
Commit d0090bf1 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: consider bricks attributes for cache name

Übergeordneter 01c5aab1
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -276,7 +276,7 @@ public function create(): string
.\md5($this->getType())
.'/'
.$this->hash
.'/'.\md5(\serialize($this->getAttributes()));
.'/'.\md5(\serialize($this->getSettings()));
if ($this->getAttribute('cacheable')) {
try {
......@@ -567,11 +567,11 @@ public function getCustomFields(): array
/**
* Add an extra CSS Class to the control
*
* @param string $cssClass - Name of the CSS Class
* @param string|array $cssClass - Name of the CSS Class
*
* @return void
*/
public function addCSSClass(string $cssClass)
public function addCSSClass($cssClass)
{
if (\is_array($cssClass)) {
$cssClass = \implode(' ', $cssClass);
......
......@@ -20,19 +20,19 @@ class ContentSwitcher extends QUI\Control
*
* @param array $attributes
*/
public function __construct($attributes = array())
public function __construct($attributes = [])
{
// default options
$this->setAttributes(array(
$this->setAttributes([
'title' => 'Content Switcher',
'contentList' => false,
'entries' => array()
));
'entries' => []
]);
parent::__construct($attributes);
$this->addCSSFile(
dirname(__FILE__) . '/ContentSwitcher.css'
dirname(__FILE__).'/ContentSwitcher.css'
);
}
......@@ -46,15 +46,15 @@ public function getBody()
$Engine = QUI::getTemplateManager()->getEngine();
$entries = $this->getAttribute('entries');
if (is_string($entries)) {
$entries = json_decode($entries, true);
if (\is_string($entries)) {
$entries = \json_decode($entries, true);
}
$Engine->assign(array(
$Engine->assign([
'this' => $this,
'entries' => $entries
));
]);
return $Engine->fetch(dirname(__FILE__) . '/ContentSwitcher.html');
return $Engine->fetch(\dirname(__FILE__).'/ContentSwitcher.html');
}
}
......@@ -183,11 +183,11 @@ public function createUniqueSiteBrick(Site $Site, $brickData = [])
*
* @param integer $brickId - Brick ID
* @param Site $Site - Current Site
* @return bool
* @return string
*
* @throws QUI\Exception
*/
protected function createUniqueBrickId(int $brickId, Site $Site): bool
protected function createUniqueBrickId(int $brickId, Site $Site): string
{
$Project = $Site->getProject();
$uuid = QUI\Utils\Uuid::get();
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren